@finueva/drive 0.27.0 → 0.29.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 +14 -0
- package/README.md +29 -3
- package/dist/client.d.ts +3 -6
- package/dist/client.js +1 -1
- package/dist/contract.d.ts +252 -11
- package/dist/contract2.d.ts +1 -1
- package/dist/contract3.d.ts +10 -0
- package/dist/index.d.ts +3 -3
- 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
|
@@ -2915,6 +2915,8 @@ interface operations {
|
|
|
2915
2915
|
query?: {
|
|
2916
2916
|
limit?: number;
|
|
2917
2917
|
cursor?: string;
|
|
2918
|
+
/** @description Opt in to current version size and type, creation and modification time, creator, and effective owner on every item. Absent keeps the minimal item shape. */
|
|
2919
|
+
include?: "metadata";
|
|
2918
2920
|
};
|
|
2919
2921
|
header?: never;
|
|
2920
2922
|
path: {
|
|
@@ -2933,14 +2935,27 @@ interface operations {
|
|
|
2933
2935
|
content: {
|
|
2934
2936
|
"application/json": {
|
|
2935
2937
|
items: {
|
|
2938
|
+
createdAtEpochMilliseconds?: number | null;
|
|
2939
|
+
creatorUserId?: string | null;
|
|
2940
|
+
currentVersion?: {
|
|
2941
|
+
byteLength: number;
|
|
2942
|
+
mediaType: string;
|
|
2943
|
+
/** @enum {string} */
|
|
2944
|
+
protectionClassification: "ordinary" | "opaque-encrypted";
|
|
2945
|
+
/** @enum {string} */
|
|
2946
|
+
state: "current";
|
|
2947
|
+
versionId: string;
|
|
2948
|
+
} | null;
|
|
2936
2949
|
itemId: string;
|
|
2937
2950
|
/** @enum {string} */
|
|
2938
2951
|
kind: "file" | "folder";
|
|
2952
|
+
modifiedAtEpochMilliseconds?: number | null;
|
|
2939
2953
|
/**
|
|
2940
2954
|
* Format: finueva-safe-filename
|
|
2941
2955
|
* @description NFC-normalized filename of at most 255 Unicode code points and 255 UTF-8 bytes. Slash, backslash, control characters, U+2028/U+2029, trailing dot/space, dot entries, and Windows reserved base names are forbidden.
|
|
2942
2956
|
*/
|
|
2943
2957
|
name: string;
|
|
2958
|
+
ownerUserId?: string | null;
|
|
2944
2959
|
parentItemId: string;
|
|
2945
2960
|
revision: number;
|
|
2946
2961
|
/** @enum {string} */
|
|
@@ -5415,12 +5430,14 @@ interface operations {
|
|
|
5415
5430
|
content: {
|
|
5416
5431
|
"application/json": {
|
|
5417
5432
|
/** @description Normalized email, at most 320 UTF-8 bytes. */
|
|
5418
|
-
email
|
|
5433
|
+
email?: string;
|
|
5419
5434
|
/** @description Require the freshly resolved Auth user ID to match before creating a grant. A mismatch returns registration_conflict without mutation. */
|
|
5420
5435
|
expectedRecipientUserId?: string;
|
|
5421
5436
|
/** @enum {string} */
|
|
5422
5437
|
role: "viewer" | "editor";
|
|
5423
|
-
|
|
5438
|
+
/** @description Exact canonical Auth User ID; Auth verifies current recipient eligibility. */
|
|
5439
|
+
userId?: string;
|
|
5440
|
+
} & (unknown | unknown);
|
|
5424
5441
|
};
|
|
5425
5442
|
};
|
|
5426
5443
|
responses: {
|
|
@@ -7510,6 +7527,154 @@ interface operations {
|
|
|
7510
7527
|
};
|
|
7511
7528
|
};
|
|
7512
7529
|
};
|
|
7530
|
+
getOrganizationMemberStorageUsage: {
|
|
7531
|
+
parameters: {
|
|
7532
|
+
query?: never;
|
|
7533
|
+
header?: {
|
|
7534
|
+
/** @description Current opaque Auth bearer session. Required unless the actor cookie header is present; bearer takes precedence. */
|
|
7535
|
+
"x-finueva-actor-authorization"?: string;
|
|
7536
|
+
/** @description Current Auth session cookie, forwarded only to the configured Auth origin. */
|
|
7537
|
+
"x-finueva-actor-cookie"?: string;
|
|
7538
|
+
};
|
|
7539
|
+
path: {
|
|
7540
|
+
workspaceId: string;
|
|
7541
|
+
};
|
|
7542
|
+
cookie?: never;
|
|
7543
|
+
};
|
|
7544
|
+
requestBody: {
|
|
7545
|
+
content: {
|
|
7546
|
+
"application/json": {
|
|
7547
|
+
applicationCredential: string;
|
|
7548
|
+
applicationId: string;
|
|
7549
|
+
/** Format: uri */
|
|
7550
|
+
applicationOrigin: string;
|
|
7551
|
+
userIds: string[];
|
|
7552
|
+
};
|
|
7553
|
+
};
|
|
7554
|
+
};
|
|
7555
|
+
responses: {
|
|
7556
|
+
/** @description Fresh manual-administrator authority; no file names, content or grants. */
|
|
7557
|
+
200: {
|
|
7558
|
+
headers: {
|
|
7559
|
+
[name: string]: unknown;
|
|
7560
|
+
};
|
|
7561
|
+
content: {
|
|
7562
|
+
"application/json": {
|
|
7563
|
+
/** @enum {string} */
|
|
7564
|
+
accounting: "owned-current-versions";
|
|
7565
|
+
members: {
|
|
7566
|
+
fileCount: number;
|
|
7567
|
+
usedBytes: string;
|
|
7568
|
+
userId: string;
|
|
7569
|
+
}[];
|
|
7570
|
+
workspaceId: string;
|
|
7571
|
+
};
|
|
7572
|
+
};
|
|
7573
|
+
};
|
|
7574
|
+
/** @description Authentication required. */
|
|
7575
|
+
401: {
|
|
7576
|
+
headers: {
|
|
7577
|
+
[name: string]: unknown;
|
|
7578
|
+
};
|
|
7579
|
+
content: {
|
|
7580
|
+
"application/json": {
|
|
7581
|
+
error: {
|
|
7582
|
+
/** @enum {string} */
|
|
7583
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7584
|
+
details: Record<string, never>;
|
|
7585
|
+
message: string;
|
|
7586
|
+
requestId: string;
|
|
7587
|
+
};
|
|
7588
|
+
};
|
|
7589
|
+
};
|
|
7590
|
+
};
|
|
7591
|
+
/** @description The action is not permitted. */
|
|
7592
|
+
403: {
|
|
7593
|
+
headers: {
|
|
7594
|
+
[name: string]: unknown;
|
|
7595
|
+
};
|
|
7596
|
+
content: {
|
|
7597
|
+
"application/json": {
|
|
7598
|
+
error: {
|
|
7599
|
+
/** @enum {string} */
|
|
7600
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7601
|
+
details: Record<string, never>;
|
|
7602
|
+
message: string;
|
|
7603
|
+
requestId: string;
|
|
7604
|
+
};
|
|
7605
|
+
};
|
|
7606
|
+
};
|
|
7607
|
+
};
|
|
7608
|
+
/** @description Workspace not found. */
|
|
7609
|
+
404: {
|
|
7610
|
+
headers: {
|
|
7611
|
+
[name: string]: unknown;
|
|
7612
|
+
};
|
|
7613
|
+
content: {
|
|
7614
|
+
"application/json": {
|
|
7615
|
+
error: {
|
|
7616
|
+
/** @enum {string} */
|
|
7617
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7618
|
+
details: Record<string, never>;
|
|
7619
|
+
message: string;
|
|
7620
|
+
requestId: string;
|
|
7621
|
+
};
|
|
7622
|
+
};
|
|
7623
|
+
};
|
|
7624
|
+
};
|
|
7625
|
+
/** @description The selected authority or page changed; restart the query. */
|
|
7626
|
+
409: {
|
|
7627
|
+
headers: {
|
|
7628
|
+
[name: string]: unknown;
|
|
7629
|
+
};
|
|
7630
|
+
content: {
|
|
7631
|
+
"application/json": {
|
|
7632
|
+
error: {
|
|
7633
|
+
/** @enum {string} */
|
|
7634
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7635
|
+
details: Record<string, never>;
|
|
7636
|
+
message: string;
|
|
7637
|
+
requestId: string;
|
|
7638
|
+
};
|
|
7639
|
+
};
|
|
7640
|
+
};
|
|
7641
|
+
};
|
|
7642
|
+
/** @description Invalid request or cursor. */
|
|
7643
|
+
422: {
|
|
7644
|
+
headers: {
|
|
7645
|
+
[name: string]: unknown;
|
|
7646
|
+
};
|
|
7647
|
+
content: {
|
|
7648
|
+
"application/json": {
|
|
7649
|
+
error: {
|
|
7650
|
+
/** @enum {string} */
|
|
7651
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7652
|
+
details: Record<string, never>;
|
|
7653
|
+
message: string;
|
|
7654
|
+
requestId: string;
|
|
7655
|
+
};
|
|
7656
|
+
};
|
|
7657
|
+
};
|
|
7658
|
+
};
|
|
7659
|
+
/** @description Authoritative state is unavailable. */
|
|
7660
|
+
503: {
|
|
7661
|
+
headers: {
|
|
7662
|
+
[name: string]: unknown;
|
|
7663
|
+
};
|
|
7664
|
+
content: {
|
|
7665
|
+
"application/json": {
|
|
7666
|
+
error: {
|
|
7667
|
+
/** @enum {string} */
|
|
7668
|
+
code: "authentication_required" | "identity_authority_unavailable" | "permission_denied" | "resource_not_found" | "invalid_request" | "invalid_pagination_cursor" | "precondition_failed" | "service_unavailable";
|
|
7669
|
+
details: Record<string, never>;
|
|
7670
|
+
message: string;
|
|
7671
|
+
requestId: string;
|
|
7672
|
+
};
|
|
7673
|
+
};
|
|
7674
|
+
};
|
|
7675
|
+
};
|
|
7676
|
+
};
|
|
7677
|
+
};
|
|
7513
7678
|
}
|
|
7514
7679
|
//#endregion
|
|
7515
7680
|
//#region src/types.d.ts
|
|
@@ -7571,13 +7736,15 @@ interface DriveEditingClientConfig {
|
|
|
7571
7736
|
readonly audience: string;
|
|
7572
7737
|
readonly fetch?: typeof globalThis.fetch;
|
|
7573
7738
|
readonly timeoutMilliseconds?: number;
|
|
7739
|
+
readonly upload?: DriveUploadConfig;
|
|
7574
7740
|
}
|
|
7575
7741
|
type DriveEditingServerClient = VerifiedTransferOperations & Pick<DriveOperations, "getFileAccessContext" | "createDownload" | "downloadItem">;
|
|
7576
7742
|
type DriveEditingClient = DriveEditingServerClient & {
|
|
7577
7743
|
uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
|
|
7578
7744
|
};
|
|
7579
7745
|
type ResourcePath = operations["listFolderChildren"]["parameters"]["path"];
|
|
7580
|
-
type
|
|
7746
|
+
type FolderChildrenQuery = NonNullable<operations["listFolderChildren"]["parameters"]["query"]>;
|
|
7747
|
+
type PageQuery = Pick<FolderChildrenQuery, "limit" | "cursor">;
|
|
7581
7748
|
type SearchWorkspaceItemsPath = operations["searchWorkspaceItems"]["parameters"]["path"];
|
|
7582
7749
|
type SearchWorkspaceItemsQuery = NonNullable<operations["searchWorkspaceItems"]["parameters"]["query"]>;
|
|
7583
7750
|
type CreateFolderBody = JsonRequest<"createFolder">;
|
|
@@ -7605,17 +7772,22 @@ type ItemSharingPeoplePage = Readonly<Omit<JsonResponse<"listItemSharingPeople",
|
|
|
7605
7772
|
readonly recipient: RegisteredRecipientDisplay | null;
|
|
7606
7773
|
})[];
|
|
7607
7774
|
}>;
|
|
7608
|
-
|
|
7775
|
+
type RegisterItemRecipientInput = {
|
|
7609
7776
|
readonly workspaceId: string;
|
|
7610
7777
|
readonly itemId: string;
|
|
7611
|
-
readonly email: string;
|
|
7612
7778
|
/** Assert the freshly resolved Auth identity before any grant is created. */
|
|
7613
7779
|
readonly expectedRecipientUserId?: string;
|
|
7614
7780
|
readonly role: "viewer" | "editor";
|
|
7615
7781
|
readonly ifMatch: string;
|
|
7616
7782
|
readonly idempotencyKey: string;
|
|
7617
7783
|
readonly signal?: AbortSignal;
|
|
7618
|
-
}
|
|
7784
|
+
} & ({
|
|
7785
|
+
readonly email: string;
|
|
7786
|
+
readonly userId?: never;
|
|
7787
|
+
} | {
|
|
7788
|
+
readonly userId: string;
|
|
7789
|
+
readonly email?: never;
|
|
7790
|
+
});
|
|
7619
7791
|
type ListItemSharingPeopleInput = ListItemPermissionsInput;
|
|
7620
7792
|
type GeneratedIncomingItemPage = JsonResponse<"listIncomingItems", 200>;
|
|
7621
7793
|
type IncomingItemMetadata = Readonly<GeneratedIncomingItemPage["items"][number]>;
|
|
@@ -7645,6 +7817,14 @@ type WorkspaceDiscoveryPage = Readonly<{
|
|
|
7645
7817
|
nextCursor: string | null;
|
|
7646
7818
|
}>;
|
|
7647
7819
|
type CurrentUserWorkspaceUsage = Readonly<JsonResponse<"getCurrentUserWorkspaceUsage", 200>>;
|
|
7820
|
+
type OrganizationMemberStorageUsage = Readonly<JsonResponse<"getOrganizationMemberStorageUsage", 200>>;
|
|
7821
|
+
type OrganizationMemberStorageUsageInput = Readonly<Omit<JsonRequest<"getOrganizationMemberStorageUsage">, "userIds"> & {
|
|
7822
|
+
workspaceId: string;
|
|
7823
|
+
userIds: readonly string[];
|
|
7824
|
+
actorAuthorization?: string;
|
|
7825
|
+
actorCookie?: string;
|
|
7826
|
+
signal?: AbortSignal;
|
|
7827
|
+
}>;
|
|
7648
7828
|
type GeneratedWorkspaceUsage = JsonResponse<"getWorkspaceUsage", 200>;
|
|
7649
7829
|
type WorkspaceUsage = Readonly<Omit<GeneratedWorkspaceUsage, "warnings"> & {
|
|
7650
7830
|
readonly warnings: readonly GeneratedWorkspaceUsage["warnings"][number][];
|
|
@@ -7728,6 +7908,11 @@ type CurrentWorkspace = Readonly<Omit<GeneratedCurrentWorkspace, "workspaceRefer
|
|
|
7728
7908
|
readonly workspaceReference: Readonly<GeneratedCurrentWorkspace["workspaceReference"]>;
|
|
7729
7909
|
}>;
|
|
7730
7910
|
type FolderItem = Readonly<JsonResponse<"createFolder", 201>>;
|
|
7911
|
+
type GeneratedFolderPage = JsonResponse<"listFolderChildren", 200>;
|
|
7912
|
+
/** `metadata` adds current version size and type, timestamps, creator and effective owner to every listed item. */
|
|
7913
|
+
type FolderListInclude = NonNullable<FolderChildrenQuery["include"]>;
|
|
7914
|
+
/** A listed child. Detail fields are present exactly when the listing requested `include: "metadata"`. */
|
|
7915
|
+
type FolderListedItem = Readonly<GeneratedFolderPage["items"][number]>;
|
|
7731
7916
|
type ManagedLifecycleItem = Readonly<JsonResponse<"updateItem", 200>>;
|
|
7732
7917
|
type GeneratedManagedItemMetadata = JsonResponse<"getItem", 200>;
|
|
7733
7918
|
type ManagedItemMetadata = Readonly<Omit<GeneratedManagedItemMetadata, "currentVersion"> & {
|
|
@@ -7769,8 +7954,8 @@ type PermissionMutation = Readonly<Omit<GeneratedPermissionMutation, "grant"> &
|
|
|
7769
7954
|
}>;
|
|
7770
7955
|
type GeneratedEffectivePermissionResponse = JsonResponse<"readEffectiveItemPermissions", 200>;
|
|
7771
7956
|
type EffectivePermissionAction = Readonly<GeneratedEffectivePermissionResponse["actions"][number]>;
|
|
7772
|
-
type FolderPage = Readonly<Omit<
|
|
7773
|
-
readonly items: readonly
|
|
7957
|
+
type FolderPage = Readonly<Omit<GeneratedFolderPage, "items"> & {
|
|
7958
|
+
readonly items: readonly FolderListedItem[];
|
|
7774
7959
|
}>;
|
|
7775
7960
|
type PermissionPage = Readonly<Omit<JsonResponse<"listItemPermissions", 200>, "items"> & {
|
|
7776
7961
|
readonly items: readonly PermissionGrant[];
|
|
@@ -7786,7 +7971,40 @@ interface DriveClientConfig {
|
|
|
7786
7971
|
readonly baseUrl: string;
|
|
7787
7972
|
readonly fetch?: typeof globalThis.fetch;
|
|
7788
7973
|
readonly getCredential: DriveCredentialProvider;
|
|
7974
|
+
/**
|
|
7975
|
+
* Deadline for every API request, 1 ms through 120 s, default 30 s. Setting it explicitly also keeps its earlier
|
|
7976
|
+
* meaning for the object upload: it caps the whole provider PUT unless `upload.maxDurationMilliseconds` is set.
|
|
7977
|
+
*/
|
|
7789
7978
|
readonly timeoutMilliseconds?: number;
|
|
7979
|
+
readonly upload?: DriveUploadConfig;
|
|
7980
|
+
}
|
|
7981
|
+
/**
|
|
7982
|
+
* Bounds and transport for the direct provider PUT behind `uploadVerifiedFile`.
|
|
7983
|
+
*
|
|
7984
|
+
* Progress and stall detection need a transport that reports bytes sent. Without a custom `fetch`, browsers and
|
|
7985
|
+
* webviews use `XMLHttpRequest` for a cross-origin provider PUT; other runtimes, and any custom `fetch` that is not
|
|
7986
|
+
* wrapped with `createUploadProgressFetch`, use plain `fetch`. Plain `fetch` reports only 0 and then all bytes and is
|
|
7987
|
+
* not stall-checked.
|
|
7988
|
+
*/
|
|
7989
|
+
interface DriveUploadConfig {
|
|
7990
|
+
/**
|
|
7991
|
+
* Abort the provider PUT when no new byte has been sent for this many milliseconds, or when the response does not
|
|
7992
|
+
* follow the last byte within the same window. Default 30 000, range 1 through 3 600 000. It applies only when the
|
|
7993
|
+
* transport reports progress.
|
|
7994
|
+
*/
|
|
7995
|
+
readonly stallTimeoutMilliseconds?: number;
|
|
7996
|
+
/**
|
|
7997
|
+
* Overall cap on the provider PUT, range 1 through 3 600 000. Without it the PUT is bounded only by stall detection
|
|
7998
|
+
* and the capability expiry, unless `timeoutMilliseconds` was set explicitly, which then applies as this cap. The
|
|
7999
|
+
* expiry always applies and is at most five minutes after admission.
|
|
8000
|
+
*/
|
|
8001
|
+
readonly maxDurationMilliseconds?: number;
|
|
8002
|
+
/**
|
|
8003
|
+
* `auto` (default) selects a progress-reporting transport when the runtime offers one and no custom `fetch` is
|
|
8004
|
+
* configured. `fetch` always uses `fetch` with coarse progress and no stall detection, which also keeps `fetch`'s
|
|
8005
|
+
* `redirect: "manual"`, `referrerPolicy: "no-referrer"` and `credentials: "omit"` guarantees.
|
|
8006
|
+
*/
|
|
8007
|
+
readonly transport?: "auto" | "fetch";
|
|
7790
8008
|
}
|
|
7791
8009
|
interface DriveServerClientConfig {
|
|
7792
8010
|
readonly baseUrl: string;
|
|
@@ -7809,7 +8027,9 @@ type ResourceInput = Readonly<ResourcePath> & {
|
|
|
7809
8027
|
readonly signal?: AbortSignal;
|
|
7810
8028
|
};
|
|
7811
8029
|
type PageInput = ResourceInput & Readonly<PageQuery>;
|
|
7812
|
-
type ListFolderChildrenInput = PageInput
|
|
8030
|
+
type ListFolderChildrenInput = PageInput & {
|
|
8031
|
+
readonly include?: FolderListInclude;
|
|
8032
|
+
};
|
|
7813
8033
|
type GetItemInput = ResourceInput;
|
|
7814
8034
|
type SearchWorkspaceItemsInput = Readonly<SearchWorkspaceItemsPath> & Readonly<SearchWorkspaceItemsQuery> & {
|
|
7815
8035
|
readonly signal?: AbortSignal;
|
|
@@ -7869,12 +8089,31 @@ type CreateDownloadInput = Readonly<CreateDownloadPath> & Readonly<CreateDownloa
|
|
|
7869
8089
|
};
|
|
7870
8090
|
type DownloadItemResult = Response | DriveOperationResult<ManagedDownloadRestorePending, 202> | DriveOperationResult<undefined, 304>;
|
|
7871
8091
|
type UploadFilePhase = "preparing" | "uploading" | "completing" | "verifying";
|
|
8092
|
+
/**
|
|
8093
|
+
* The step within an upload `phase`, in the order `hashing`, `preparing`, `uploading`, `completing`.
|
|
8094
|
+
* `hashing` and `preparing` both report phase `preparing`. A published replay never uploads and a file of at most
|
|
8095
|
+
* 1 MiB has no separate `preparing` request, so either may skip a stage; a stage never repeats or goes back.
|
|
8096
|
+
*/
|
|
8097
|
+
type UploadFileStage = "hashing" | "preparing" | "uploading" | "completing";
|
|
7872
8098
|
interface UploadFileProgress {
|
|
7873
8099
|
readonly phase: UploadFilePhase;
|
|
8100
|
+
/**
|
|
8101
|
+
* 0 while `preparing`, `sentByteLength` while `uploading` and `totalByteLength` once `completing`. While uploading it
|
|
8102
|
+
* counts bytes the transport has sent, which the service has not accepted yet; only `published` confirms the file.
|
|
8103
|
+
*/
|
|
7874
8104
|
readonly confirmedByteLength: number;
|
|
7875
8105
|
readonly totalByteLength: number;
|
|
7876
8106
|
readonly confirmedPartCount: number;
|
|
7877
8107
|
readonly totalPartCount: number;
|
|
8108
|
+
/** Present from SDK 0.29. The finer step within `phase`. */
|
|
8109
|
+
readonly stage?: UploadFileStage;
|
|
8110
|
+
/** Present from SDK 0.29. Bytes hashed so far; `totalByteLength` from the end of `hashing` on. */
|
|
8111
|
+
readonly hashedByteLength?: number;
|
|
8112
|
+
/**
|
|
8113
|
+
* Present from SDK 0.29. Bytes the transport has sent to storage so far. With a progress-reporting transport it rises
|
|
8114
|
+
* between 0 and `totalByteLength` while `uploading`; otherwise it jumps from 0 to `totalByteLength` at `completing`.
|
|
8115
|
+
*/
|
|
8116
|
+
readonly sentByteLength?: number;
|
|
7878
8117
|
}
|
|
7879
8118
|
type UploadFileProgressCallback = (progress: UploadFileProgress) => void;
|
|
7880
8119
|
interface GetCurrentWorkspaceInput {
|
|
@@ -7974,9 +8213,11 @@ interface DriveVisitorClient {
|
|
|
7974
8213
|
}): Promise<DriveOperationResult<VisitorSession, 200>>;
|
|
7975
8214
|
createEditingSession(input: CreateVisitorEditingSessionInput): Promise<DriveOperationResult<VisitorEditingSession, 201>>;
|
|
7976
8215
|
}
|
|
7977
|
-
interface DriveServerClient extends DriveOperations, VerifiedTransferOperations {
|
|
8216
|
+
interface DriveServerClient extends DriveOperations, VerifiedTransferOperations {
|
|
8217
|
+
getOrganizationMemberStorageUsage(input: OrganizationMemberStorageUsageInput): Promise<DriveOperationResult<OrganizationMemberStorageUsage, 200>>;
|
|
8218
|
+
}
|
|
7978
8219
|
interface DriveClient extends DriveOperations, VerifiedTransferOperations {
|
|
7979
8220
|
uploadVerifiedFile(input: UploadVerifiedFileInput): Promise<DriveOperationResult<PublishedVerifiedTransfer, 200>>;
|
|
7980
8221
|
}
|
|
7981
8222
|
//#endregion
|
|
7982
|
-
export {
|
|
8223
|
+
export { ListFolderChildrenInput as $, VisitorEditingSession as $t, DriveUploadConfig as A, RecoverVerifiedTransferInput as At, FolderListedItem as B, UpdateItemInput as Bt, DriveEditingClientConfig as C, PermissionPage as Ct, DriveResponseValidators as D, PublishVerifiedTransferInput as Dt, DriveOperations as E, ProtectionClassification as Et, EffectivePermissionAction as F, RevokeItemPermissionInput as Ft, GetVisitorGrantInput as G, UploadFileProgressCallback as Gt, GetCurrentWorkspaceInput as H, UpdateWorkspaceSharingPolicyInput as Ht, EffectivePermissionResponse as I, RevokeVisitorGrantInput as It, IncomingItemPage as J, UploadVerifiedFileInput as Jt, GetWorkspaceUsageInput as K, UploadFileStage as Kt, FileAccessContext as L, SearchWorkspaceItemsInput as Lt, DriveVisitorClientConfig as M, RegisteredRecipientDisplay as Mt, EditingSession as N, RestoreItemInput as Nt, DriveServerClient as O, PublishedVerifiedTransfer as Ot, EditingSessionCreation as P, RestoreItemVersionInput as Pt, ItemSharingPeoplePage as Q, VisitorDownloadInput as Qt, FolderItem as R, TransferItemOwnershipInput as Rt, DriveEditingClient as S, PermissionMutation as St, DriveOperationResult as T, PreparedVerifiedTransfer as Tt, GetItemInput as U, UploadFilePhase as Ut, FolderPage as V, UpdateItemPermissionInput as Vt, GetItemVersionInput as W, UploadFileProgress as Wt, IncomingSharePage as X, VisitorChildren as Xt, IncomingShareContext as Y, VerifiedTransferOperations as Yt, ItemOwnershipTransfer as Z, VisitorChildrenInput as Zt, DownloadItemResult as _, OwnedItem as _t, CollectOwnedItemsInput as a, VisitorSession as an, ListOwnedItemsInput as at, DriveCredentialContext as b, PermissionGrant as bt, CreateEditingSessionInput as c, WorkspaceItemSearchItem as cn, ManagedDownloadRestorePending as ct, CreateVisitorEditingSessionInput as d, WorkspaceUsage as dn, ManagedItemVersionPage as dt, VisitorGrant as en, ListIncomingItemsInput as et, CreateVisitorGrantInput as f, operations as fn, ManagedItemVersionResource as ft, DeleteItemInput as g, OrganizationMemberStorageUsageInput as gt, CurrentWorkspaceSources as h, OrganizationMemberStorageUsage as ht, ChangeEditingSessionInput as i, VisitorReadInput as in, ListItemVersionsInput as it, DriveVisitorClient as j, RegisterItemRecipientInput as jt, DriveServerClientConfig as k, ReadEffectiveItemPermissionsInput as kt, CreateFolderInput as l, WorkspaceItemSearchPage as ln, ManagedItemMetadata as lt, CurrentWorkspace as m, ManagedLifecycleItem as mt, ArchiveItemInput as n, VisitorGrantPage as nn, ListItemPermissionsInput as nt, CollectedOwnedItems as o, WorkspaceDiscoveryItem as on, ListWorkspaceItemsInput as ot, CurrentUserWorkspaceUsage as p, ManagedItemVersionRestoreResult as pt, IncomingItemMetadata as q, UploadSmallVerifiedFileInput as qt, ArchivedItem as r, VisitorItem as rn, ListItemSharingPeopleInput as rt, CreateDownloadInput as s, WorkspaceDiscoveryPage as sn, ManagedDownloadDescriptor as st, AdmittedVerifiedTransfer as t, VisitorGrantCreation as tn, ListIncomingSharesInput as tt, CreateItemPermissionInput as u, WorkspaceSharingPolicy as un, ManagedItemVersion as ut, DriveClient as v, OwnedItemPage as vt, DriveEditingServerClient as w, PrepareVerifiedTransferInput as wt, DriveCredentialProvider as x, PermissionGrantee as xt, DriveClientConfig as y, PermissionAction as yt, FolderListInclude as z, TrashItemInput as zt };
|
package/dist/contract2.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { E as DriveOperations, M as DriveVisitorClientConfig, a as CollectOwnedItemsInput, j as DriveVisitorClient, o as CollectedOwnedItems } 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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { C as DriveEditingClientConfig, S as DriveEditingClient, v as DriveClient, y as DriveClientConfig } from "./contract.js";
|
|
2
|
+
//#region src/internal/client/provider-xhr.d.ts
|
|
3
|
+
/** `createProgressFetch` for callers composing their own `fetch`, for example one that fences each dispatch. */
|
|
4
|
+
declare function createUploadProgressFetch(fetchImplementation?: typeof globalThis.fetch): typeof globalThis.fetch;
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/client.d.ts
|
|
7
|
+
declare function createDriveEditingClient(config: DriveEditingClientConfig): DriveEditingClient;
|
|
8
|
+
declare function createDriveClient(config: DriveClientConfig): DriveClient;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { createDriveEditingClient as n, createUploadProgressFetch as r, createDriveClient as t };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as ListFolderChildrenInput, A as DriveUploadConfig, At as RecoverVerifiedTransferInput, B as FolderListedItem, Bt as UpdateItemInput, C as DriveEditingClientConfig, D as DriveResponseValidators, Dt as PublishVerifiedTransferInput, E as DriveOperations, Et as ProtectionClassification, F as EffectivePermissionAction, Ft as RevokeItemPermissionInput, G as GetVisitorGrantInput, Gt as UploadFileProgressCallback, H as GetCurrentWorkspaceInput, Ht as UpdateWorkspaceSharingPolicyInput, It as RevokeVisitorGrantInput, J as IncomingItemPage, Jt as UploadVerifiedFileInput, K as GetWorkspaceUsageInput, Kt as UploadFileStage, L as FileAccessContext, Lt as SearchWorkspaceItemsInput, M as DriveVisitorClientConfig, N as EditingSession, Nt as RestoreItemInput, Ot as PublishedVerifiedTransfer, P as EditingSessionCreation, Pt as RestoreItemVersionInput, Qt as VisitorDownloadInput, R as FolderItem, Rt as TransferItemOwnershipInput, S as DriveEditingClient, St as PermissionMutation, T as DriveOperationResult, Tt as PreparedVerifiedTransfer, U as GetItemInput, Ut as UploadFilePhase, V as FolderPage, Vt as UpdateItemPermissionInput, W as GetItemVersionInput, Wt as UploadFileProgress, Xt as VisitorChildren, Yt as VerifiedTransferOperations, Z as ItemOwnershipTransfer, Zt as VisitorChildrenInput, _ as DownloadItemResult, _t as OwnedItem, a as CollectOwnedItemsInput, an as VisitorSession, at as ListOwnedItemsInput, bt as PermissionGrant, c as CreateEditingSessionInput, cn as WorkspaceItemSearchItem, ct as ManagedDownloadRestorePending, dn as WorkspaceUsage, dt as ManagedItemVersionPage, en as VisitorGrant, et as ListIncomingItemsInput, f as CreateVisitorGrantInput, ft as ManagedItemVersionResource, g as DeleteItemInput, h as CurrentWorkspaceSources, i as ChangeEditingSessionInput, in as VisitorReadInput, it as ListItemVersionsInput, j as DriveVisitorClient, kt as ReadEffectiveItemPermissionsInput, l as CreateFolderInput, ln as WorkspaceItemSearchPage, lt as ManagedItemMetadata, m as CurrentWorkspace, mt as ManagedLifecycleItem, n as ArchiveItemInput, nn as VisitorGrantPage, nt as ListItemPermissionsInput, o as CollectedOwnedItems, on as WorkspaceDiscoveryItem, ot as ListWorkspaceItemsInput, p as CurrentUserWorkspaceUsage, pt as ManagedItemVersionRestoreResult, q as IncomingItemMetadata, r as ArchivedItem, rn as VisitorItem, s as CreateDownloadInput, sn as WorkspaceDiscoveryPage, st as ManagedDownloadDescriptor, t as AdmittedVerifiedTransfer, tn as VisitorGrantCreation, u as CreateItemPermissionInput, un as WorkspaceSharingPolicy, ut as ManagedItemVersion, v as DriveClient, vt as OwnedItemPage, wt as PrepareVerifiedTransferInput, x as DriveCredentialProvider, xt as PermissionGrantee, y as DriveClientConfig, yt as PermissionAction, z as FolderListInclude, zt as TrashItemInput } 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
|
-
import {
|
|
4
|
+
import { n as createDriveEditingClient, r as createUploadProgressFetch, t as createDriveClient } from "./contract3.js";
|
|
5
5
|
//#region src/internal/client/verified-operation.d.ts
|
|
6
6
|
/** Generate once per logical operation and retain the exact key across ambiguous retries. */
|
|
7
7
|
declare function createVerifiedOperationKey(issuedAtEpochMilliseconds?: number): string;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { type AdmittedVerifiedTransfer, type ArchiveItemInput, type ArchivedItem, type ChangeEditingSessionInput, type CollectOwnedItemsInput, type CollectedOwnedItems, type CreateDownloadInput, type CreateEditingSessionInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateVisitorGrantInput, type CurrentUserWorkspaceUsage, 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 EditingSession, type EditingSessionCreation, type EffectivePermissionAction, type FileAccessContext, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type IncomingItemMetadata, type IncomingItemPage, type ItemOwnershipTransfer, type ListFolderChildrenInput, type ListIncomingItemsInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ListOwnedItemsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type OwnedItem, type OwnedItemPage, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type PrepareVerifiedTransferInput, type PreparedVerifiedTransfer, type ProtectionClassification, type PublishVerifiedTransferInput, type PublishedVerifiedTransfer, type ReadEffectiveItemPermissionsInput, type RecoverVerifiedTransferInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TransferItemOwnershipInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UpdateWorkspaceSharingPolicyInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadVerifiedFileInput, type VerifiedTransferOperations, 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 WorkspaceSharingPolicy, type WorkspaceUsage, collectOwnedItems, createDriveClient, createDriveEditingClient, createDriveVisitorClient, createVerifiedOperationKey, createVisitorSessionToken };
|
|
9
|
+
export { type AdmittedVerifiedTransfer, type ArchiveItemInput, type ArchivedItem, type ChangeEditingSessionInput, type CollectOwnedItemsInput, type CollectedOwnedItems, type CreateDownloadInput, type CreateEditingSessionInput, type CreateFolderInput, type CreateItemPermissionInput, type CreateVisitorGrantInput, type CurrentUserWorkspaceUsage, 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 DriveUploadConfig, type DriveVisitorClient, type DriveVisitorClientConfig, type EditingSession, type EditingSessionCreation, type EffectivePermissionAction, type FileAccessContext, type FolderItem, type FolderListInclude, type FolderListedItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type IncomingItemMetadata, type IncomingItemPage, type ItemOwnershipTransfer, type ListFolderChildrenInput, type ListIncomingItemsInput, type ListItemPermissionsInput, type ListItemVersionsInput, type ListOwnedItemsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type OwnedItem, type OwnedItemPage, type PermissionAction, type PermissionGrant, type PermissionGrantee, type PermissionMutation, type PrepareVerifiedTransferInput, type PreparedVerifiedTransfer, type ProtectionClassification, type PublishVerifiedTransferInput, type PublishedVerifiedTransfer, type ReadEffectiveItemPermissionsInput, type RecoverVerifiedTransferInput, type RestoreItemInput, type RestoreItemVersionInput, type RevokeItemPermissionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TransferItemOwnershipInput, type TrashItemInput, type UpdateItemInput, type UpdateItemPermissionInput, type UpdateWorkspaceSharingPolicyInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadFileStage, type UploadVerifiedFileInput, type VerifiedTransferOperations, 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 WorkspaceSharingPolicy, type WorkspaceUsage, collectOwnedItems, createDriveClient, createDriveEditingClient, createDriveVisitorClient, createUploadProgressFetch, createVerifiedOperationKey, createVisitorSessionToken };
|