@owlmeans/payment 0.1.19-rc.0 → 0.1.19

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 CHANGED
@@ -8,7 +8,7 @@ server integration (`@owlmeans/server-payment`) implements against these contrac
8
8
  ## Installation
9
9
 
10
10
  ```bash
11
- bun add @owlmeans/payment@^0.1.19-rc.0
11
+ bun add @owlmeans/payment@^0.1.19
12
12
  ```
13
13
 
14
14
  ## Concepts
@@ -129,7 +129,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
129
129
  your project's skill store (`.agents/skills/`):
130
130
 
131
131
  ```sh
132
- npx @owlmeans/agent-skills@^0.1.19-rc.0
132
+ npx @owlmeans/agent-skills@^0.1.19
133
133
  ```
134
134
 
135
135
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 3,
3
3
  "package": "@owlmeans/payment",
4
- "version": "0.1.19-rc.0",
5
- "generatedAt": "2026-10-31T12:13:02.392Z",
4
+ "version": "0.1.19",
5
+ "generatedAt": "2026-11-01T22:22:22.312Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: entitlements
3
- description: "The OwlMeans entitlement model across @owlmeans/payment, @owlmeans/server-payment and @owlmeans/web-payment — ranked plans with a real free plan, capabilities versus counted limits, the three limit kinds, promos and grandfathering, the admission-first usage ledger and its may-over-count-never-over-admit invariant, the entitlement view the server gate and the browser both read, the two gate services, and the refusal errors. Use when deciding what a plan grants, gating a route on a feature or a quota, consuming or releasing a limit, or rendering plan state in a UI."
3
+ description: "The OwlMeans entitlement model across @owlmeans/payment, @owlmeans/server-payment and @owlmeans/web-payment — ranked plans with a real free plan, capabilities versus counted limits, the three limit kinds, promos and grandfathering, entitlement grants (units and capabilities for one organization beside its plan), the admission-first usage ledger and its may-over-count-never-over-admit invariant, the entitlement view the server gate and the browser both read, the two gate services, and the refusal errors. Use when deciding what a plan grants, gating a route on a feature or a quota, consuming or releasing a limit, or rendering plan state in a UI."
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -39,6 +39,25 @@ answer from the same pure functions, so a disabled button and a 403 cannot disag
39
39
  - A plan names its keys, never a product's copy: every limit key an application gates on appears
40
40
  on every plan (with `limit: 0` where not included), so "not included" is an answer, not a
41
41
  missing row.
42
+ - **An operator's plan is an internal grant**: `grantInternalPlan(…, { force: true, periodEnd })`
43
+ gives any plan without a paygate, `revokeInternalPlan` ends it (observers hear `canceled`); a
44
+ re-grant after a lapse re-activates the same row and keeps its first `createdAt` (`restartedAt`
45
+ marks the restart) — the `server-payment` skill, § The subscription store.
46
+
47
+ ## Entitlement grants — more than the plan, for one organization
48
+
49
+ A `payment-grant` record (`entitlementGrantsOf(ctx)`, `server-payment` § Entitlement grants) adds to
50
+ ONE organization, beside whatever plan it holds, until it ends or is revoked:
51
+
52
+ - **units** of a limit key — consumed only AFTER the plan's own allowance, folded into the limit's
53
+ `limit` / `used` / `remaining` everywhere the limit is read (the entitlement view and the gates
54
+ carry no extra field); a revoke drops the unused units, the used ones stay consumed, and an
55
+ occupancy held past the new ceiling follows the ordinary over-limit flag;
56
+ - **a capability** (`scope:permission[>=n]`) — merged into the effective plan while in force; a
57
+ units grant may carry the capability its units need (published sites need the publish feature).
58
+ - Read limits and capabilities from the effective plan or the view, never from the catalogue, or a
59
+ grant is missed exactly as an override would be. `onEntitlementGrant` is the application's hook
60
+ to provision on a gain and withdraw on a loss.
42
61
 
43
62
  ## Capabilities versus limits
44
63
 
@@ -8,7 +8,7 @@ user-invocable: false
8
8
  # @owlmeans/payment
9
9
 
10
10
  **Layer:** Core
11
- **Install:** `"@owlmeans/payment": "^0.1.19-rc.0"` in `dependencies`
11
+ **Install:** `"@owlmeans/payment": "^0.1.19"` in `dependencies`
12
12
 
13
13
  The contracts half of payments: the catalogue (products, plans, localizations), amount- and
14
14
  quantity-priced checkout, the entitlement model — plan capabilities, counted limits, promos,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/payment",
3
- "version": "0.1.19-rc.0",
3
+ "version": "0.1.19",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,19 +32,19 @@
32
32
  "ajv": "*"
33
33
  },
34
34
  "dependencies": {
35
- "@owlmeans/api-config": "^0.1.19-rc.0",
36
- "@owlmeans/auth": "^0.1.19-rc.0",
37
- "@owlmeans/basic-envelope": "^0.1.19-rc.0",
38
- "@owlmeans/config": "^0.1.19-rc.0",
39
- "@owlmeans/context": "^0.1.18",
40
- "@owlmeans/error": "^0.1.18",
41
- "@owlmeans/i18n": "^0.1.18",
42
- "@owlmeans/entrypoint": "^0.1.19-rc.0",
43
- "@owlmeans/resource": "^0.1.19-rc.0",
44
- "@owlmeans/route": "^0.1.18"
35
+ "@owlmeans/api-config": "^0.1.19",
36
+ "@owlmeans/auth": "^0.1.19",
37
+ "@owlmeans/basic-envelope": "^0.1.19",
38
+ "@owlmeans/config": "^0.1.19",
39
+ "@owlmeans/context": "^0.1.19",
40
+ "@owlmeans/error": "^0.1.19",
41
+ "@owlmeans/i18n": "^0.1.19",
42
+ "@owlmeans/entrypoint": "^0.1.19",
43
+ "@owlmeans/resource": "^0.1.19",
44
+ "@owlmeans/route": "^0.1.19"
45
45
  },
46
46
  "devDependencies": {
47
- "@owlmeans/dep-config": "^0.1.18",
47
+ "@owlmeans/dep-config": "^0.1.19",
48
48
  "nodemon": "^3.1.14",
49
49
  "typescript": "^7.0.2"
50
50
  },