@proxyrequest/sdk 2.0.0 → 3.0.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.
- package/CHANGELOG.md +21 -0
- package/README.md +21 -2
- package/dist/index.cjs +916 -41
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -26
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +42 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +922 -19
- package/dist/index.js.map +1 -1
- package/dist/{models-CNN_LuGV.d.ts → models-2V3Llpqk.d.cts} +4 -3
- package/dist/{models-BDeknFzS.d.cts.map → models-2V3Llpqk.d.cts.map} +1 -1
- package/dist/{models-BDeknFzS.d.cts → models-Bemi0dKg.d.ts} +4 -3
- package/dist/{models-CNN_LuGV.d.ts.map → models-Bemi0dKg.d.ts.map} +1 -1
- package/dist/models.d.cts +2 -2
- package/dist/models.d.ts +2 -2
- package/dist/openapi.d.cts +1 -1
- package/dist/openapi.d.ts +1 -1
- package/dist/{schema-BNl4txEF.d.cts → schema-BZvnw81E.d.cts} +249 -81
- package/dist/schema-BZvnw81E.d.cts.map +1 -0
- package/dist/{schema-BNl4txEF.d.ts → schema-BZvnw81E.d.ts} +249 -81
- package/dist/schema-BZvnw81E.d.ts.map +1 -0
- package/docs/analytics.md +47 -0
- package/docs/third-party-notices.md +38 -0
- package/docs/webhooks.md +1 -1
- package/package.json +2 -1
- package/dist/schema-BNl4txEF.d.cts.map +0 -1
- package/dist/schema-BNl4txEF.d.ts.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [3.0.1] - 2026-09-21
|
|
8
|
+
|
|
9
|
+
- Bundle openapi-fetch to fix client construction in CommonJS builds.
|
|
10
|
+
- Verify actual feed requests and exact IDs in installed ESM and CommonJS packages.
|
|
11
|
+
- Supersede the GitHub-only 3.0.0 build; npm publication of 3.0.0 was blocked by registry authorization.
|
|
12
|
+
|
|
13
|
+
## [3.0.0] - 2026-09-21
|
|
14
|
+
|
|
15
|
+
- Keep the exported `SDK_VERSION` synchronized with the package version and verify it in the package smoke test.
|
|
16
|
+
|
|
17
|
+
- Synchronize the public OpenAPI contract from backend commit `2c4505a`.
|
|
18
|
+
- Accept Unix seconds and all documented date strings while preserving existing date inputs.
|
|
19
|
+
- Keep the legacy logs hostname argument and existing response contracts.
|
|
20
|
+
- Cover feed/domains pagination, nullable feed timestamps, and UInt64 IDs with regression tests.
|
|
21
|
+
- **Breaking:** return every feed ID as an exact decimal string; see [migration notes](docs/analytics.md).
|
|
22
|
+
|
|
23
|
+
## [2.1.0] - 2026-09-17
|
|
24
|
+
|
|
25
|
+
- Add atomic per-package data reset with typed requests, response metadata, and idempotent retries.
|
|
26
|
+
- Refresh the public API contract and document root balances versus child allocations.
|
|
27
|
+
|
|
7
28
|
## [2.0.0] - 2026-09-16
|
|
8
29
|
|
|
9
30
|
### Changed
|
package/README.md
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
The official TypeScript SDK for the [ProxyRequest public API](https://proxyrequest.com/docs/api/). It provides a typed, promise-based client for Node.js 22+ and modern browsers, with both ESM and CommonJS builds.
|
|
9
9
|
|
|
10
|
+
See [analytics formats and compatibility](docs/analytics.md) for Unix timestamps,
|
|
11
|
+
reporting windows, and feed identifiers.
|
|
12
|
+
|
|
10
13
|
## What is ProxyRequest?
|
|
11
14
|
|
|
12
15
|
[ProxyRequest](https://proxyrequest.com/) is the control plane for operating a white-label proxy platform. It connects the commercial and operational pieces that a proxy provider or reseller would otherwise have to build separately:
|
|
@@ -84,8 +87,8 @@ Never embed a Static API key or webhook secret in frontend JavaScript. Browser s
|
|
|
84
87
|
|
|
85
88
|
## Resource API
|
|
86
89
|
|
|
87
|
-
The client exposes
|
|
88
|
-
public schema contains
|
|
90
|
+
The client exposes 80 supported operations through 17 resource groups. The pinned
|
|
91
|
+
public schema contains 82 operations; the disabled `sessions_list` and
|
|
89
92
|
`sessions_destroy` operations are intentionally excluded from the SDK. Sticky
|
|
90
93
|
session options in proxy generation remain supported.
|
|
91
94
|
|
|
@@ -351,3 +354,19 @@ The repository also has a real Chromium smoke test via `npm run test:browser`.
|
|
|
351
354
|
## License
|
|
352
355
|
|
|
353
356
|
[MIT](LICENSE)
|
|
357
|
+
|
|
358
|
+
## Reset remaining data (SDK 2.1.0+)
|
|
359
|
+
|
|
360
|
+
```typescript
|
|
361
|
+
const order = await client.users.resetData({
|
|
362
|
+
id: userId,
|
|
363
|
+
body: { package_id: packageId },
|
|
364
|
+
idempotencyKey: resetOperationId,
|
|
365
|
+
});
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Send only `package_id`, without `data`. A system administrator can reset any user; other accounts can reset only their direct children. The server atomically clears positive, zero, or negative remaining data for a finite package and returns the updated order. Unlimited packages are rejected. Root orders lose their remaining ledger balances; child orders lose their remaining quota without changing the parent pool. Usage history and invoices are preserved.
|
|
369
|
+
|
|
370
|
+
Persist one operation ID and reuse it when retrying the same reset, including after a process restart. This prevents a repeated request from clearing a later top-up. Use subtraction when an explicit amount should be removed from a child quota. The backend must support the reset endpoint before calling it.
|
|
371
|
+
|
|
372
|
+
Version 2.1 retains legacy user and invoice models from 2.0 for compatibility with older deployments. These compatibility types do not change the current public API contract.
|