@unofficialbox/box-open-sdk 0.1.0 → 0.1.2
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/README.md +47 -5
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,13 +1,55 @@
|
|
|
1
|
-
<!-- Generated by box-gantry. DO NOT EDIT. -->
|
|
2
|
-
|
|
1
|
+
<!-- Generated by box-gantry. DO NOT EDIT — regenerate from the specs instead. -->
|
|
2
|
+

|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
# @unofficialbox/box-open-sdk
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/@unofficialbox/box-open-sdk)
|
|
7
|
+
|
|
8
|
+
A **community, unofficial** Box API client for TypeScript — fully typed models
|
|
9
|
+
for the whole Box surface, one manager per API area behind a single `Client`,
|
|
10
|
+
and a `fetch`-based runtime with retry, backoff, and token refresh. Ships as a
|
|
11
|
+
**dual ESM/CJS** package with bundled `.d.ts` declarations; no runtime
|
|
12
|
+
dependencies.
|
|
13
|
+
|
|
14
|
+
> **Not affiliated with, authorized, or endorsed by Box, Inc.** "Box" is a
|
|
15
|
+
> trademark of Box, Inc. This is an independent, generated client.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install @unofficialbox/box-open-sdk
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quickstart
|
|
6
24
|
|
|
7
25
|
```ts
|
|
8
26
|
import { Client, runtime } from '@unofficialbox/box-open-sdk';
|
|
27
|
+
|
|
28
|
+
// Developer token for a quick start; CCG, OAuth, and JWT are also supported.
|
|
9
29
|
const client = new Client(runtime.developerToken('DEVELOPER_TOKEN'));
|
|
30
|
+
|
|
31
|
+
// Every API area is a typed manager on the client.
|
|
32
|
+
const me = await client.users.getMe();
|
|
33
|
+
console.log(me);
|
|
34
|
+
|
|
35
|
+
// List endpoints are async iterators — paging is automatic.
|
|
36
|
+
for await (const user of client.users.list()) {
|
|
37
|
+
console.log(user.id);
|
|
38
|
+
}
|
|
10
39
|
```
|
|
11
40
|
|
|
12
|
-
|
|
41
|
+
## Authentication
|
|
42
|
+
|
|
43
|
+
The runtime implements Box's four auth flows — **developer token**, **client
|
|
44
|
+
credentials (CCG)**, **OAuth 2.0** (with a pluggable refresh-token store), and
|
|
45
|
+
**JWT** (server auth, exposed as the Node-only `./jwt` subpath). See
|
|
46
|
+
[`docs/auth.md`](./docs/auth.md).
|
|
47
|
+
|
|
48
|
+
## Documentation
|
|
49
|
+
|
|
50
|
+
The [`docs/`](./docs/README.md) tree carries the per-manager reference and the
|
|
13
51
|
authentication, pagination, and errors guides.
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT. Generated by [box-gantry](https://github.com/unofficialbox/box-gantry).
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unofficialbox/box-open-sdk",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Community, unofficial Box API client for TypeScript — typed models, async managers, and a fetch runtime with retry, backoff, and token refresh.",
|
|
5
|
+
"keywords": ["box", "box-api", "sdk", "api-client", "typescript", "unofficial"],
|
|
5
6
|
"license": "MIT",
|
|
6
7
|
"repository": { "type": "git", "url": "git+https://github.com/unofficialbox/box-open-ts-sdk.git" },
|
|
7
8
|
"homepage": "https://github.com/unofficialbox/box-open-ts-sdk",
|