@stackbe/sdk 0.10.0 → 0.11.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 +66 -0
- package/package.json +10 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the StackBE SDK will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.11.1] - 2026-01-09
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- CHANGELOG.md now included in npm package for better visibility of changes
|
|
9
|
+
|
|
10
|
+
## [0.11.0] - 2026-01-09
|
|
11
|
+
|
|
12
|
+
### Backend Compatibility
|
|
13
|
+
All SDK methods now have full API backend support:
|
|
14
|
+
|
|
15
|
+
- **`checkout.getSession()`** - Retrieve checkout session status by ID
|
|
16
|
+
- **`subscriptions.update()`** - Change subscription plans with proration support
|
|
17
|
+
- **`entitlements.check()`** - Check customer access to specific features
|
|
18
|
+
- **`entitlements.getAll()`** - Get all entitlements for a customer
|
|
19
|
+
- **`customers.update()`** - Update customer name and metadata
|
|
20
|
+
|
|
21
|
+
### API Endpoints Added
|
|
22
|
+
- `GET /v1/checkout/session/:sessionId` - Get checkout session details
|
|
23
|
+
- `PATCH /v1/subscriptions/:id` - Update subscription (plan changes)
|
|
24
|
+
- `GET /v1/customers/:customerId/entitlements` - List customer entitlements
|
|
25
|
+
- `GET /v1/customers/:customerId/entitlements/check` - Check feature access
|
|
26
|
+
- `PATCH /v1/customers/:id` - Update customer properties
|
|
27
|
+
|
|
28
|
+
## [0.10.0] - 2025-01-08
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
- Initial public release
|
|
32
|
+
- Full TypeScript support
|
|
33
|
+
- 88 SDK methods covering:
|
|
34
|
+
- Authentication (magic links)
|
|
35
|
+
- Checkout sessions
|
|
36
|
+
- Subscriptions (CRUD, pause/resume, trials, dunning)
|
|
37
|
+
- Entitlements
|
|
38
|
+
- Usage tracking
|
|
39
|
+
- Analytics
|
|
40
|
+
- Customers
|
|
41
|
+
- Organizations
|
|
42
|
+
- Affiliates
|
|
43
|
+
- Coupons
|
|
44
|
+
- Feature requests
|
|
45
|
+
- Early access
|
|
46
|
+
|
|
47
|
+
## [0.9.0] - 2024-12-30
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
- Affiliate system endpoints
|
|
51
|
+
- Organization management
|
|
52
|
+
- Analytics dashboard methods
|
|
53
|
+
|
|
54
|
+
## [0.8.0] - 2024-12-20
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- Dunning/payment recovery methods
|
|
58
|
+
- Trial management (extend, end)
|
|
59
|
+
- Grace period support
|
|
60
|
+
|
|
61
|
+
## [0.7.0] - 2024-12-15
|
|
62
|
+
|
|
63
|
+
### Added
|
|
64
|
+
- Subscription pause/resume
|
|
65
|
+
- Billing history endpoints
|
|
66
|
+
- Invoice retrieval
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackbe/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Official JavaScript/TypeScript SDK for StackBE - the billing backend for your side project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -13,14 +13,18 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"CHANGELOG.md"
|
|
17
18
|
],
|
|
18
19
|
"scripts": {
|
|
19
20
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
20
21
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
21
22
|
"lint": "eslint src/",
|
|
22
23
|
"typecheck": "tsc --noEmit",
|
|
23
|
-
"prepublishOnly": "npm run build"
|
|
24
|
+
"prepublishOnly": "npm run build",
|
|
25
|
+
"test": "jest",
|
|
26
|
+
"test:contract": "jest test/contract.test.ts",
|
|
27
|
+
"test:contract:prod": "API_URL=https://api.stackbe.io jest test/contract.test.ts"
|
|
24
28
|
},
|
|
25
29
|
"keywords": [
|
|
26
30
|
"stackbe",
|
|
@@ -42,7 +46,10 @@
|
|
|
42
46
|
"url": "https://github.com/Epic-Design-Labs/app-stackbe-sdk/issues"
|
|
43
47
|
},
|
|
44
48
|
"devDependencies": {
|
|
49
|
+
"@types/jest": "^30.0.0",
|
|
45
50
|
"@types/node": "^20.10.0",
|
|
51
|
+
"jest": "^30.2.0",
|
|
52
|
+
"ts-jest": "^29.4.6",
|
|
46
53
|
"tsup": "^8.0.1",
|
|
47
54
|
"typescript": "^5.3.0"
|
|
48
55
|
},
|