better-auth-streampay 1.1.6 → 1.2.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/README.md +13 -1
- package/dist/client.d.cts +2 -2
- package/dist/client.d.ts +2 -2
- package/dist/index.cjs +466 -165
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -82
- package/dist/index.d.ts +34 -82
- package/dist/index.js +466 -165
- package/dist/index.js.map +1 -1
- package/dist/{streampay-a7EIioZY.d.cts → streampay-DMlTwJUB.d.cts} +3163 -2739
- package/dist/{streampay-a7EIioZY.d.ts → streampay-DMlTwJUB.d.ts} +3163 -2739
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -273,7 +273,7 @@ Each callback receives `{ subscription, user, streampaySubscription, event }`.
|
|
|
273
273
|
| `/subscription/freeze` | POST | |
|
|
274
274
|
| `/subscription/unfreeze` | POST | Ends the active freeze early |
|
|
275
275
|
| `/subscription/list` | GET | Local rows + plan config |
|
|
276
|
-
| `/subscription/current?group=...` | GET |
|
|
276
|
+
| `/subscription/current?group=...` | GET | Returns `active`/`frozen`/`past_due` only (or `null`). See note below. |
|
|
277
277
|
| `/subscription/has-feature?feature=X` | GET | Boolean entitlement |
|
|
278
278
|
| `/subscription/check-limit?feature=X&count=N` | GET | `{ allowed, limit, remaining }` |
|
|
279
279
|
|
|
@@ -317,6 +317,18 @@ const flag = await authClient.hasSubscriptionFeature({ feature: "ai_calls" })
|
|
|
317
317
|
|
|
318
318
|
`incomplete | active | inactive | expired | canceled | frozen | past_due`
|
|
319
319
|
|
|
320
|
+
> **`/subscription/current` filter semantics**
|
|
321
|
+
>
|
|
322
|
+
> `/subscription/current` intentionally returns only rows whose status is
|
|
323
|
+
> `active`, `frozen`, or `past_due` — i.e. live entitlements. **`incomplete`
|
|
324
|
+
> rows are filtered out.**
|
|
325
|
+
>
|
|
326
|
+
> Practical consequence: between `/subscription/upgrade` (which creates an
|
|
327
|
+
> `incomplete` row and a payment link) and the `SUBSCRIPTION_ACTIVATED`
|
|
328
|
+
> webhook landing, `/subscription/current` returns `null`. If you want to
|
|
329
|
+
> render "your subscription is being activated" during that window, call
|
|
330
|
+
> `/subscription/list` and filter for `status === "incomplete"` in your UI.
|
|
331
|
+
|
|
320
332
|
- `incomplete` — row pre-created at `/upgrade`, webhook not landed yet.
|
|
321
333
|
- `past_due` — renewal failed. StreamPay keeps `ACTIVE` during dunning; we don't.
|
|
322
334
|
|
package/dist/client.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as streampay, E as ErrorCodeEntry } from './streampay-
|
|
2
|
-
export { $ as $ERROR_CODES, S as StreamPayErrorCode } from './streampay-
|
|
1
|
+
import { s as streampay, E as ErrorCodeEntry } from './streampay-DMlTwJUB.cjs';
|
|
2
|
+
export { $ as $ERROR_CODES, S as StreamPayErrorCode } from './streampay-DMlTwJUB.cjs';
|
|
3
3
|
import '@streamsdk/typescript';
|
|
4
4
|
import 'better-auth';
|
|
5
5
|
import 'zod/v4/core';
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as streampay, E as ErrorCodeEntry } from './streampay-
|
|
2
|
-
export { $ as $ERROR_CODES, S as StreamPayErrorCode } from './streampay-
|
|
1
|
+
import { s as streampay, E as ErrorCodeEntry } from './streampay-DMlTwJUB.js';
|
|
2
|
+
export { $ as $ERROR_CODES, S as StreamPayErrorCode } from './streampay-DMlTwJUB.js';
|
|
3
3
|
import '@streamsdk/typescript';
|
|
4
4
|
import 'better-auth';
|
|
5
5
|
import 'zod/v4/core';
|