@owlmeans/client-payment 0.1.18-rc.2 → 0.1.18-rc.20

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
@@ -12,7 +12,7 @@ Client-side payment service integration for the OwlMeans context system.
12
12
  ## Installation
13
13
 
14
14
  ```bash
15
- bun add @owlmeans/client-payment
15
+ bun add @owlmeans/client-payment@^0.1.18-rc.19
16
16
  ```
17
17
 
18
18
  ## Usage
@@ -58,7 +58,7 @@ This package ships embedded agent skills under `agent-meta/`. After installing y
58
58
  your project's skill store (`.agents/skills/`):
59
59
 
60
60
  ```sh
61
- npx @owlmeans/agent-skills
61
+ npx @owlmeans/agent-skills@^0.1.18-rc.12
62
62
  ```
63
63
 
64
64
  The embedded files are version-matched to this package release. Do not edit them
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "package": "@owlmeans/client-payment",
4
- "version": "0.1.18-rc.0",
5
- "generatedAt": "2026-08-16T22:20:50.504Z",
4
+ "version": "0.1.18-rc.20",
5
+ "generatedAt": "2026-09-04T22:43:25.440Z",
6
6
  "canonicalRepo": "https://github.com/owlmeans/common",
7
7
  "entries": [
8
8
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: client-payment
3
- description: How to use @owlmeans/client-payment — client-side payment service that wraps @owlmeans/payment for use from a React app. Auto-invoked when importing client payment primitives.
3
+ description: How to use @owlmeans/client-payment — the browser-side PaymentService, which adds a cached shallow identity on top of @owlmeans/payment so a returning visitor keeps their profile without re-presenting a token. Auto-invoked when registering the payment service in a client context or calling shallowAuthentication from a browser.
4
4
  user-invocable: false
5
5
  ---
6
6
  <!-- AUTO-GENERATED — do not edit. Regenerate via sync-agent-meta. -->
@@ -8,23 +8,50 @@ user-invocable: false
8
8
  # @owlmeans/client-payment
9
9
 
10
10
  **Layer:** Client
11
- **Install:** `"@owlmeans/client-payment": "^0.1.18-rc.0"` in `dependencies`
11
+ **Install:** `"@owlmeans/client-payment": "^0.1.18-rc.20"` in `dependencies` (peer `react`)
12
12
 
13
- ## Key Exports
13
+ The same `PaymentService` as `@owlmeans/payment`, with one method adapted for a browser. Everything
14
+ else — the catalogue reads, the entitlement helpers, the entrypoint aliases — is imported from the
15
+ core package unchanged.
16
+
17
+ ## Key exports
14
18
 
15
19
  | Export | Description |
16
- |--------|-------------|
17
- | `makePaymentService()` | Client-side payment service factory |
18
- | Payment types | Re-exports / extends `@owlmeans/payment` types |
19
- | Constants | Service aliases |
20
+ |---|---|
21
+ | `makePaymentService(alias?)` · `appendPaymentService(ctx, alias?)` | The client service factory and its registration helper. Same signatures as the core package's. |
22
+ | `SHALLOW_AUTH` | `'payment:shallow-auth'` — the record id the resolved profile is cached under. |
23
+ | `DEFAULT_ALIAS` | Re-exported, so a client wires the service without also importing the core package. |
24
+ | `PaymentService` | Re-exported type. |
25
+
26
+ ## What it changes: `shallowAuthentication`
27
+
28
+ A checkout leaves the app and comes back, and the token that identified the visitor on the way out
29
+ is gone by the time they return. So the client override persists the answer:
30
+
31
+ - **With a token** — the core implementation reads the `profileId` out of it, then the result is
32
+ saved into the client auth resource (`AUTH_RESOURCE`) under `SHALLOW_AUTH`.
33
+ - **Without one** — the saved record is loaded instead, and its `profileId` returned. When there is
34
+ no record, or it carries no profile, it throws `PaymentIdentificationError`.
20
35
 
21
- ## Usage
36
+ This is identification, not authorization: the token is read, never verified. Gate a paid
37
+ capability with `entitled(...)` on the route rather than with anything this returns.
22
38
 
23
39
  ```typescript
24
- import { makePaymentService } from '@owlmeans/client-payment'
25
- context.registerService(makePaymentService())
40
+ import { appendPaymentService } from '@owlmeans/client-payment'
41
+
42
+ appendPaymentService(context)
26
43
  ```
27
44
 
45
+ Registering under the core `DEFAULT_ALIAS` is what lets shared code resolve one payment service
46
+ whichever side it runs on. The client auth resource must be registered too — the override reads it
47
+ on every call.
48
+
28
49
  ## Depends On
29
50
 
30
- - `@owlmeans/payment`, `@owlmeans/client-context`, `@owlmeans/client-entrypoint`
51
+ - `@owlmeans/payment` · `@owlmeans/client-auth` (`AUTH_RESOURCE`) · `@owlmeans/context`
52
+ - peer `react`
53
+
54
+ ## Related
55
+
56
+ - [[payment]] — the contracts, the catalogue and the entitlement grammar
57
+ - [[client-auth]] — the auth resource the shallow identity is cached in
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owlmeans/client-payment",
3
- "version": "0.1.18-rc.2",
3
+ "version": "0.1.18-rc.20",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -21,9 +21,9 @@
21
21
  }
22
22
  },
23
23
  "dependencies": {
24
- "@owlmeans/client-auth": "^0.1.18-rc.2",
25
- "@owlmeans/context": "^0.1.18-rc.2",
26
- "@owlmeans/payment": "^0.1.18-rc.2"
24
+ "@owlmeans/client-auth": "^0.1.18-rc.20",
25
+ "@owlmeans/context": "^0.1.18-rc.8",
26
+ "@owlmeans/payment": "^0.1.18-rc.13"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "*"
package/build/.gitkeep DELETED
File without changes