@finueva/drive 0.1.0 → 0.2.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 +16 -12
- package/dist/client.d.ts +2 -2
- package/dist/client.js +1160 -1067
- package/dist/contract.d.ts +395 -500
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1160 -1067
- package/dist/server.d.ts +2 -2
- package/dist/server.js +1160 -1067
- package/dist/types.d.ts +2 -2
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @finueva/drive
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 8e472b7: Add `getCurrentWorkspace` for resolving the authenticated Drive workspace and canonical managed root.
|
|
8
|
+
|
|
9
|
+
## 0.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ad7d7e8: Correct the package README to reflect its npm publication status.
|
|
14
|
+
|
|
3
15
|
## 0.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# `@finueva/drive`
|
|
2
2
|
|
|
3
|
-
The public TypeScript client for Finueva Drive. The
|
|
3
|
+
The public TypeScript client for Finueva Drive. The package is published to npm; the API remains Local Experimental.
|
|
4
4
|
|
|
5
5
|
The package is ESM-only. Node.js 22 is the exact minimum; package CI qualifies Node.js 22 and 24. Modern browsers and Cloudflare Workers use Web Fetch, Streams, URL, and AbortSignal.
|
|
6
6
|
|
|
7
7
|
## Exports
|
|
8
8
|
|
|
9
|
-
| Import | Runtime
|
|
10
|
-
| ----------------------- |
|
|
11
|
-
| `@finueva/drive` | Browser-safe client factory, errors, and curated types
|
|
12
|
-
| `@finueva/drive/client` | Browser-safe client factory
|
|
13
|
-
| `@finueva/drive/server` | Request-scoped Worker and Node client factory
|
|
14
|
-
| `@finueva/drive/core` | Reviewed error values only
|
|
15
|
-
| `@finueva/drive/types` | Curated folder, permission, and upload quota types
|
|
9
|
+
| Import | Runtime |
|
|
10
|
+
| ----------------------- | ------------------------------------------------------------- |
|
|
11
|
+
| `@finueva/drive` | Browser-safe client factory, errors, and curated types |
|
|
12
|
+
| `@finueva/drive/client` | Browser-safe client factory |
|
|
13
|
+
| `@finueva/drive/server` | Request-scoped Worker and Node client factory |
|
|
14
|
+
| `@finueva/drive/core` | Reviewed error values only |
|
|
15
|
+
| `@finueva/drive/types` | Curated workspace, folder, permission, and upload quota types |
|
|
16
16
|
|
|
17
17
|
## Browser
|
|
18
18
|
|
|
@@ -25,9 +25,10 @@ const drive = createDriveClient({
|
|
|
25
25
|
timeoutMilliseconds: 30_000,
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
+
const { data: workspace } = await drive.getCurrentWorkspace();
|
|
28
29
|
const page = await drive.listFolderChildren({
|
|
29
|
-
workspaceId,
|
|
30
|
-
itemId,
|
|
30
|
+
workspaceId: workspace.workspaceId,
|
|
31
|
+
itemId: workspace.rootItemId,
|
|
31
32
|
limit: 50,
|
|
32
33
|
});
|
|
33
34
|
```
|
|
@@ -51,6 +52,7 @@ Create a client per request when using user authority. A fixed `credential` stri
|
|
|
51
52
|
|
|
52
53
|
Methods use the Native API operation IDs:
|
|
53
54
|
|
|
55
|
+
- `getCurrentWorkspace`
|
|
54
56
|
- `listFolderChildren`
|
|
55
57
|
- `createFolder`
|
|
56
58
|
- `listItemPermissions`
|
|
@@ -61,6 +63,8 @@ Methods use the Native API operation IDs:
|
|
|
61
63
|
- `createUpload`
|
|
62
64
|
- `abortUpload`
|
|
63
65
|
|
|
66
|
+
`getCurrentWorkspace` maps the credential's selected Auth context to the provisioned Drive workspace and canonical managed root. It accepts only an optional `{ signal }` input, never provisions as a side effect, and returns no entitlement, credential, or private persistence fields.
|
|
67
|
+
|
|
64
68
|
Every mutation requires the API's explicit idempotency key when the operation defines one and, for grants, a precondition validator. Mutations are never retried automatically. Sparse updates omit `undefined` properties and preserve explicit `null` expiry.
|
|
65
69
|
|
|
66
70
|
Successful calls return `{ data, status, requestId, validators }`. A successful response must carry one valid `X-Request-ID`; canonical API errors must carry the same request ID in their header and body. Any missing, malformed, or mismatched value is an `invalid_response`. The only exposed validators are `etag`, `permissionCollectionEtag`, and `permissionGrantEtag`.
|
|
@@ -86,6 +90,6 @@ Use an absolute HTTPS URL. Plain HTTP is accepted only for `localhost`, `127.0.0
|
|
|
86
90
|
|
|
87
91
|
## Release Status
|
|
88
92
|
|
|
89
|
-
|
|
93
|
+
Releases are selected by reviewed Changesets. Qualification builds the exact compiled Drive Worker, obtains `/api/v1/openapi.json` through Miniflare, checks generated types byte-for-byte, packs the package, and installs that tarball into clean external projects with lifecycle scripts disabled.
|
|
90
94
|
|
|
91
|
-
`@finueva/drive`
|
|
95
|
+
`@finueva/drive` is published on npm. The source repository is private, so public provenance is unavailable. ADR 0016 records the completed maintainer-2FA bootstrap; later releases use the protected OIDC workflow and npm approval without a stored npm token.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as UploadQuotaReservation, D as ReservedUploadQuota, _ as FolderPage, a as CreateUploadInput, c as DriveClientConfig, g as FolderItem, n as AbortedUploadQuota, o as CurrentWorkspace, s as DriveClient, t as AbortUploadInput, u as DriveCredentialProvider, v as GetCurrentWorkspaceInput, y as ListFolderChildrenInput } from "./contract.js";
|
|
2
2
|
//#region src/client.d.ts
|
|
3
3
|
declare function createDriveClient(config: DriveClientConfig): DriveClient;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { type AbortUploadInput, type AbortedUploadQuota, type CreateUploadInput, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, type ReservedUploadQuota, type UploadQuotaReservation, createDriveClient };
|
|
5
|
+
export { type AbortUploadInput, type AbortedUploadQuota, type CreateUploadInput, type CurrentWorkspace, type DriveClient, type DriveClientConfig, type DriveCredentialProvider, type FolderItem, type FolderPage, type GetCurrentWorkspaceInput, type ListFolderChildrenInput, type ReservedUploadQuota, type UploadQuotaReservation, createDriveClient };
|