@finueva/drive 0.17.0 → 0.19.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 CHANGED
@@ -1,5 +1,47 @@
1
1
  # @finueva/drive
2
2
 
3
+ ## 0.19.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e48484d: Readiness now reports refused private configuration. `GET /api/v1/readyz` answers `503` with `configuration: "private-values"` and a `values` array naming the private configuration values that could not satisfy their structural contract at load, alongside the existing `"app-environment"` and `"kibao-location"` refusals. Names only: the response never carries configured material. The Drive Worker validates `DRIVE_PAGINATION_CURSOR_KEYS`, `DRIVE_UPLOAD_VERIFICATION_KEYS`, `DRIVE_ARCHIVE_IDENTITY`, the recipient signing identity and the `D1_CAPACITY_*` decimals when configuration is loaded, so a malformed value fails deployment by name instead of disabling a subsystem at request time.
8
+ - d9c9ec3: Complete an upload without waiting for archive verification, and add `verification` to `completeUpload` and `uploadFile`.
9
+
10
+ `POST /uploads/{uploadId}/complete` now answers `202 verifying` as soon as the archive object is observed, the declaration is recorded and the verification checkpoint is admitted; the whole-file hash and the publication that follows it stay on the verification queue. `verification: "inline"` restores the previous single-request publish for strict callers, and editing commits keep using it. Nothing is reported `ready` before an independent readback matches, so the data-safety invariant is unchanged.
11
+
12
+ ### Patch Changes
13
+
14
+ - 17051d3: Send the signed storage PUT with `redirect: "manual"` and refuse a 3xx answer, instead of asking
15
+ the runtime for `redirect: "error"`. Node and browsers accept `"error"`, but workerd allows only
16
+ `"follow"` or `"manual"` and throws a `TypeError` before a byte leaves the process, so on
17
+ Cloudflare every single-shot and multipart upload failed at the transport: the SDK reported a
18
+ swallowed `network_error` and Drive then refused the completion with `precondition_failed`.
19
+ Refusing the 3xx ourselves keeps the original intent — a redirected storage endpoint is never
20
+ followed to an unexpected host — and now raises `invalid_response` carrying the redirect status on
21
+ every runtime rather than depending on a fetch option workerd cannot dispatch.
22
+
23
+ ## 0.18.0
24
+
25
+ ### Minor Changes
26
+
27
+ - 6474798: Add `createEditingSession` to `DriveVisitorClient` and accept `role: "editor"` on visitor grants.
28
+
29
+ A writable visitor grant authorises exactly one file for at most 24 hours and is the only visitor state that can lease a `DriveEditing` capability. `createVisitorGrant` now accepts `viewer` or `editor`, and visitor item reads and invitation redemption report the grant's role. This changeset publishes nothing on its own.
30
+
31
+ ### Patch Changes
32
+
33
+ - c661cbd: Accept the empty body stream that an ordinary HTTP client sends for a bodyless POST to
34
+ `ensureOrganizationWorkspaceAccess`. Cloudflare materializes a body stream for every POST that
35
+ declares `Content-Length: 0`, so treating the stream's presence as supplied authority refused
36
+ every real caller with `invalid_request`. Only a service-binding call leaves the stream null,
37
+ which is why the compiled suite passed while no browser or server consumer could onboard. A body
38
+ that carries bytes, a chunked body and an unreadable body are still refused.
39
+ - c70bf19: Send `x-request-id` on a successful managed workspace provisioning response. Every error path
40
+ already sent one and the SDK requires one on every response, so a committed or replayed
41
+ provisioning was rejected as `invalid_response` and no consumer could ever complete storage
42
+ setup, personal or organization. The success path also now sends the same
43
+ `no-store, no-transform` cache directive as every other Drive response.
44
+
3
45
  ## 0.17.0
4
46
 
5
47
  ### Minor Changes
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { $ as ListItemVersionsInput, $t as WorkspaceUsage, A as DriveVisitorClientConfig, At as UploadConfirmedPart, B as GetCurrentWorkspaceInput, Bt as VisitorChildren, Dt as UpdateItemInput, Et as TrashItemInput, Ft as UploadFileVersionInput, G as GetWorkspaceUsageInput, Gt as VisitorGrantPage, H as GetItemVersionInput, It as UploadPartDescriptor, J as ItemSharingPeoplePage, Jt as VisitorSession, K as IncomingShareContext, Kt as VisitorItem, L as FileAccessContext, Lt as UploadPartResult, Mt as UploadFilePhase, N as EditingSession, Nt as UploadFileProgress, P as EditingSessionCreation, Pt as UploadFileProgressCallback, Q as ListItemSharingPeopleInput, Qt as WorkspaceItemSearchPage, R as FolderItem, Rt as UploadSession, S as DriveEditingClientConfig, St as RestoreItemVersionInput, Tt as SearchWorkspaceItemsInput, U as GetUploadStatusInput, Ut as VisitorGrant, V as GetItemInput, W as GetVisitorGrantInput, Wt as VisitorGrantCreation, X as ListIncomingSharesInput, Xt as WorkspaceDiscoveryPage, Y as ListFolderChildrenInput, Yt as WorkspaceDiscoveryItem, Zt as WorkspaceItemSearchItem, _ as DriveClient, _t as ReadyUpload, a as CreateDownloadInput, at as ManagedItemVersionPage, b as DriveCredentialProvider, bt as RegisteredRecipientDisplay, ct as ManagedLifecycleItem, d as CreateUploadPartDescriptorInput, et as ListWorkspaceItemsInput, f as CreateVisitorGrantInput, g as DownloadItemResult, h as DeleteItemInput, ht as ProtectionClassification, i as CompleteUploadInput, it as ManagedItemVersion, jt as UploadFileInput, k as DriveVisitorClient, kt as UploadCompletion, lt as PendingUpload, m as CurrentWorkspaceSources, n as ChangeEditingSessionInput, nt as ManagedDownloadRestorePending, o as CreateEditingSessionInput, ot as ManagedItemVersionResource, p as CurrentWorkspace, q as IncomingSharePage, r as CommitFileVersionInput, rt as ManagedItemMetadata, s as CreateFileVersionUploadInput, st as ManagedItemVersionRestoreResult, t as AbortUploadInput, tt as ManagedDownloadDescriptor, u as CreateUploadInput, v as DriveClientConfig, vt as RecordUploadPartInput, wt as RevokeVisitorGrantInput, x as DriveEditingClient, xt as RestoreItemInput, yt as RegisterItemRecipientInput, z as FolderPage, zt as UploadStatus } from "./contract.js";
1
+ import { $ as ListItemSharingPeopleInput, $t as WorkspaceDiscoveryPage, A as DriveVisitorClient, At as UploadCompletion, B as FolderPage, Bt as UploadStatus, C as DriveEditingClientConfig, Ct as RestoreItemVersionInput, Dt as TrashItemInput, Et as SearchWorkspaceItemsInput, F as EditingSessionCreation, Ft as UploadFileProgressCallback, G as GetVisitorGrantInput, H as GetItemInput, Ht as VisitorChildren, It as UploadFileVersionInput, J as IncomingSharePage, Jt as VisitorGrantPage, K as GetWorkspaceUsageInput, Kt as VisitorGrant, Lt as UploadPartDescriptor, Mt as UploadFileInput, Nt as UploadFilePhase, Ot as UpdateItemInput, P as EditingSession, Pt as UploadFileProgress, Qt as WorkspaceDiscoveryItem, R as FileAccessContext, Rt as UploadPartResult, S as DriveEditingClient, St as RestoreItemInput, Tt as RevokeVisitorGrantInput, U as GetItemVersionInput, V as GetCurrentWorkspaceInput, Vt as UploadVerificationMode, W as GetUploadStatusInput, X as ListFolderChildrenInput, Y as ItemSharingPeoplePage, Yt as VisitorItem, Z as ListIncomingSharesInput, Zt as VisitorSession, _ as DownloadItemResult, a as CreateDownloadInput, at as ManagedItemVersion, bt as RegisterItemRecipientInput, ct as ManagedItemVersionRestoreResult, d as CreateUploadPartDescriptorInput, en as WorkspaceItemSearchItem, et as ListItemVersionsInput, g as DeleteItemInput, gt as ProtectionClassification, h as CurrentWorkspaceSources, i as CompleteUploadInput, it as ManagedItemMetadata, j as DriveVisitorClientConfig, jt as UploadConfirmedPart, lt as ManagedLifecycleItem, m as CurrentWorkspace, n as ChangeEditingSessionInput, nn as WorkspaceUsage, nt as ManagedDownloadDescriptor, o as CreateEditingSessionInput, ot as ManagedItemVersionPage, p as CreateVisitorGrantInput, q as IncomingShareContext, qt as VisitorGrantCreation, r as CommitFileVersionInput, rt as ManagedDownloadRestorePending, s as CreateFileVersionUploadInput, st as ManagedItemVersionResource, t as AbortUploadInput, tn as WorkspaceItemSearchPage, tt as ListWorkspaceItemsInput, u as CreateUploadInput, ut as PendingUpload, v as DriveClient, vt as ReadyUpload, x as DriveCredentialProvider, xt as RegisteredRecipientDisplay, y as DriveClientConfig, yt as RecordUploadPartInput, z as FolderItem, zt as UploadSession } from "./contract.js";
2
2
  import { n as createVisitorSessionToken, t as createDriveVisitorClient } from "./contract2.js";
3
3
  //#region src/client.d.ts
4
4
  declare function createDriveEditingClient(config: DriveEditingClientConfig): DriveEditingClient;
5
5
  declare function createDriveClient(config: DriveClientConfig): DriveClient;
6
6
  //#endregion
7
- export { type AbortUploadInput, type ChangeEditingSessionInput, type CommitFileVersionInput, type CompleteUploadInput, type CreateDownloadInput, type CreateEditingSessionInput, type CreateFileVersionUploadInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CreateVisitorGrantInput, type CurrentWorkspace, type CurrentWorkspaceSources, type DeleteItemInput, type DownloadItemResult, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, type DriveEditingClient, type DriveEditingClientConfig, type DriveVisitorClient, type DriveVisitorClientConfig, type EditingSession, type EditingSessionCreation, type FileAccessContext, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type IncomingShareContext, type IncomingSharePage, type ItemSharingPeoplePage, type ListFolderChildrenInput, type ListIncomingSharesInput, type ListItemSharingPeopleInput, type ListItemVersionsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PendingUpload, type ProtectionClassification, type ReadyUpload, type RecordUploadPartInput, type RegisterItemRecipientInput, type RegisteredRecipientDisplay, type RestoreItemInput, type RestoreItemVersionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, 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 VisitorGrant, type VisitorGrantCreation, type VisitorGrantPage, type VisitorItem, type VisitorSession, type WorkspaceDiscoveryItem, type WorkspaceDiscoveryPage, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, type WorkspaceUsage, createDriveClient, createDriveEditingClient, createDriveVisitorClient, createVisitorSessionToken };
7
+ export { type AbortUploadInput, type ChangeEditingSessionInput, type CommitFileVersionInput, type CompleteUploadInput, type CreateDownloadInput, type CreateEditingSessionInput, type CreateFileVersionUploadInput, type CreateUploadInput, type CreateUploadPartDescriptorInput, type CreateVisitorGrantInput, type CurrentWorkspace, type CurrentWorkspaceSources, type DeleteItemInput, type DownloadItemResult, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, type DriveEditingClient, type DriveEditingClientConfig, type DriveVisitorClient, type DriveVisitorClientConfig, type EditingSession, type EditingSessionCreation, type FileAccessContext, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type GetItemInput, type GetItemVersionInput, type GetUploadStatusInput, type GetVisitorGrantInput, type GetWorkspaceUsageInput, type IncomingShareContext, type IncomingSharePage, type ItemSharingPeoplePage, type ListFolderChildrenInput, type ListIncomingSharesInput, type ListItemSharingPeopleInput, type ListItemVersionsInput, type ListWorkspaceItemsInput, type ManagedDownloadDescriptor, type ManagedDownloadRestorePending, type ManagedItemMetadata, type ManagedItemVersion, type ManagedItemVersionPage, type ManagedItemVersionResource, type ManagedItemVersionRestoreResult, type ManagedLifecycleItem, type PendingUpload, type ProtectionClassification, type ReadyUpload, type RecordUploadPartInput, type RegisterItemRecipientInput, type RegisteredRecipientDisplay, type RestoreItemInput, type RestoreItemVersionInput, type RevokeVisitorGrantInput, type SearchWorkspaceItemsInput, type TrashItemInput, type UpdateItemInput, type UploadCompletion, type UploadConfirmedPart, type UploadFileInput, type UploadFilePhase, type UploadFileProgress, type UploadFileProgressCallback, type UploadFileVersionInput, type UploadPartDescriptor, type UploadPartResult, type UploadSession, type UploadStatus, type UploadVerificationMode, type VisitorChildren, type VisitorGrant, type VisitorGrantCreation, type VisitorGrantPage, type VisitorItem, type VisitorSession, type WorkspaceDiscoveryItem, type WorkspaceDiscoveryPage, type WorkspaceItemSearchItem, type WorkspaceItemSearchPage, type WorkspaceUsage, createDriveClient, createDriveEditingClient, createDriveVisitorClient, createVisitorSessionToken };