@putdotio/sdk 13.3.0 → 13.3.1

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.
Files changed (2) hide show
  1. package/README.md +24 -60
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
  <p>
3
- <img src="https://static.put.io/images/putio-boncuk.png" width="72">
3
+ <img src="https://static.put.io/images/putio-boncuk.png" width="72" alt="put.io boncuk">
4
4
  </p>
5
5
 
6
6
  <h1>putio-sdk-typescript</h1>
@@ -9,7 +9,7 @@
9
9
  TypeScript SDK for the <a href="https://api.put.io/v2/docs">put.io API</a>
10
10
  </p>
11
11
  <p>
12
- Domain-first, schema-validated at the boundary, and designed for all runtimes.
12
+ Domain-first, schema-validated at the boundary, and built on standard Web APIs.
13
13
  </p>
14
14
 
15
15
  <p>
@@ -180,53 +180,26 @@ effectClient.files.list(0, { per_page: 20 });
180
180
  | `createPutioSdkPromiseClient(config)` | React apps, scripts, server handlers, React Query |
181
181
  | `createPutioSdkEffectClient()` | Effect-native workflows and service composition |
182
182
 
183
- Effect is the canonical typed surface. The Promise client is an adapter for environments that want standard async functions.
183
+ Effect is the canonical typed surface; the Promise client adapts it to standard async functions.
184
184
 
185
- - Effect client: keeps errors in the Effect error channel with operation-specific typing
186
- - Promise client: throws tagged SDK error objects such as `PutioOperationError`, `PutioApiError`, and `PutioRateLimitError`
187
- - Promise client: owns a managed Effect runtime; call `await sdk.dispose()` when tearing down a long-lived client in a script, test harness, or server
188
- - Promise client: `files.createUploadFormData(...)` builds upload FormData without a request
185
+ - Effect client: keeps errors in the Effect error channel with operation-specific typing.
186
+ - Promise client: throws tagged SDK error objects such as `PutioOperationError`, `PutioApiError`, and `PutioRateLimitError`.
187
+ - Promise client: owns a managed Effect runtime; call `await sdk.dispose()` when tearing down a long-lived client.
188
+ - Promise client: `files.createUploadFormData(...)` builds upload FormData without a request.
189
189
 
190
190
  Interrupting an Effect during fetch or response-body consumption aborts the underlying
191
191
  fetch request, including JSON and binary reads. Successful reads do not abort the
192
192
  request.
193
193
 
194
- ## Namespace Surface
195
-
196
- | Namespace | Purpose |
197
- | --------------- | ------------------------------------------------------------------------------------------------ |
198
- | `account` | account info, settings, subtitle languages, app-specific passwords, confirmations, clear/destroy |
199
- | `auth` | token validation, login flows, device/OOB helpers, two-factor flows |
200
- | `config` | app-owned JSON config storage |
201
- | `downloadLinks` | download-link bundles |
202
- | `events` | history events and event torrent payloads |
203
- | `family` | family members and invites |
204
- | `files` | file listing, search, move/delete/extract, MP4, direct access URLs, upload |
205
- | `friendInvites` | friend invitation management |
206
- | `friends` | friend graph and requests |
207
- | `ifttt` | IFTTT integration endpoints |
208
- | `oauth` | OAuth app management |
209
- | `payment` | plans, vouchers, payment flows, payment history |
210
- | `podcast` | podcast feed links for folders and media types |
211
- | `rss` | RSS feed management |
212
- | `sharing` | friend shares, public shares, clone flows |
213
- | `transfers` | transfer list, add/retry/cancel/clean flows |
214
- | `trash` | trash listing, restore, delete, empty |
215
- | `tunnel` | route listing |
216
- | `utilities` | file URLs, localized errors, and shared formatting helpers |
217
- | `zips` | zip creation and lookup |
218
-
219
- ## Design Rules
220
-
221
- - schema-first contracts at every external boundary
222
- - typed errors are first-class
223
- - parameter-conditioned responses are modeled explicitly
224
- - no compatibility namespace shims in the public API
225
- - fetch-native core with runtime-portable Web APIs
194
+ ## Namespaces
195
+
196
+ Both clients expose the namespaces of `sharedOperationTree` in
197
+ [src/core/client.ts](./src/core/client.ts), such as `account`, `files`, `transfers`, and
198
+ `sharing`. Helpers live in the [utilities subpath](#utilities), not on the client.
226
199
 
227
200
  ## Runtime Requirements
228
201
 
229
- The package is designed around standard Web APIs. Host runtimes should provide:
202
+ Host runtimes must provide:
230
203
 
231
204
  - `fetch`
232
205
  - `Request`, `Response`, and `Headers`
@@ -235,11 +208,8 @@ The package is designed around standard Web APIs. Host runtimes should provide:
235
208
  - `FormData`
236
209
  - `btoa` for username/password auth flows such as `auth.login(...)`
237
210
 
238
- For upload flows, the host should also provide file-compatible inputs such as `File` or `Blob`.
239
-
240
- If a target runtime is missing these APIs, provide them with host-level polyfills or adapters instead of patching the SDK surface.
241
-
242
- CI installs the packed package into external Node, Bun, and bundled Chromium, Firefox, and WebKit consumers on every change.
211
+ Upload flows also need file inputs such as `File` or `Blob`. Fill missing APIs with host-level
212
+ polyfills or adapters instead of patching the SDK surface.
243
213
 
244
214
  ## Error Handling
245
215
 
@@ -345,12 +315,13 @@ const upload = await sdk.files.upload({
345
315
  });
346
316
  ```
347
317
 
348
- Upload targets `upload.put.io` internally because `api.put.io/v2/files/upload` is only a redirect shim.
318
+ Upload goes to `upload.put.io`, because `api.put.io/v2/files/upload` is only a redirect shim.
349
319
 
350
320
  ## Endpoint Coverage
351
321
 
352
- The TypeScript SDK mirrors the supported public put.io API surface. Scope, exclusions, and the
353
- latest audit are in [API Coverage](docs/api-coverage.md).
322
+ The SDK covers the supported public put.io API surface. It leaves out admin,
323
+ private, and service-to-service routes, browser page and callback routes, and
324
+ aliases of routes it already covers.
354
325
 
355
326
  ## File Lookup and Mutations
356
327
 
@@ -424,8 +395,8 @@ const { links, token } = await sdk.podcast.getLinks({
424
395
  });
425
396
  ```
426
397
 
427
- `links` is a partial map keyed by `all`, `audio`, `video`, and `mp4`, so consumers should
428
- check whether a requested link is present.
398
+ `links` is a partial map keyed by `all`, `audio`, `video`, and `mp4`; check that a requested
399
+ link is present.
429
400
 
430
401
  ## TanStack Query
431
402
 
@@ -472,16 +443,9 @@ export const useFiles = (parentId: number) =>
472
443
 
473
444
  ## Docs
474
445
 
475
- - [Migrating to v12](./docs/migrating-v12.md) for required `downloadToken` media URLs and the `FileUrlProvider` renames
476
- - [Migrating to v11](./docs/migrating-v11.md) for the removed Coinbase and file-search contracts
477
- - [Architecture](./docs/architecture.md) for package shape and boundaries
478
- - [Testing](./docs/testing.md) for local and live verification
479
- - [Distribution](./docs/distribution.md) for release automation
480
- - [Security policy](https://github.com/putdotio/.github/blob/main/SECURITY.md) for private vulnerability reports; fixes target the latest published release and `main`
481
-
482
- ## Contributing
483
-
484
- Contributor setup, validation, and live-test workflow live in [Contributing](./CONTRIBUTING.md).
446
+ - [Releases](https://github.com/putdotio/putio-sdk-typescript/releases): what changed in each version, breaking changes included
447
+ - [Contributing](./CONTRIBUTING.md): setup, checks, and live tests
448
+ - [Security policy](https://github.com/putdotio/.github/blob/main/SECURITY.md): private vulnerability reports
485
449
 
486
450
  ## License
487
451
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putdotio/sdk",
3
- "version": "13.3.0",
3
+ "version": "13.3.1",
4
4
  "description": "Effect-first TypeScript SDK for the put.io API.",
5
5
  "keywords": [
6
6
  "effect",
@@ -62,7 +62,7 @@
62
62
  "verify": "vp check . && vp run lint:package && knip && knip --production --no-gitignore && vp run validate:routes:packed && vp test run --coverage --passWithNoTests"
63
63
  },
64
64
  "dependencies": {
65
- "effect": "4.0.5"
65
+ "effect": "4.0.6"
66
66
  },
67
67
  "devDependencies": {
68
68
  "@arethetypeswrong/cli": "^0.18.2",
@@ -79,5 +79,5 @@
79
79
  "engines": {
80
80
  "node": ">=24.19.0"
81
81
  },
82
- "packageManager": "pnpm@12.14.0"
82
+ "packageManager": "pnpm@12.15.0"
83
83
  }