@owlmeans/client-payment 0.1.18-rc.3 → 0.1.18-rc.31
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 +2 -2
- package/agent-meta/manifest.json +2 -2
- package/agent-meta/skills/client-payment/SKILL.md +40 -11
- package/package.json +4 -4
- package/build/.gitkeep +0 -0
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.30
|
|
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.22
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
The embedded files are version-matched to this package release. Do not edit them
|
package/agent-meta/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 2,
|
|
3
3
|
"package": "@owlmeans/client-payment",
|
|
4
|
-
"version": "0.1.18-rc.
|
|
5
|
-
"generatedAt": "2026-
|
|
4
|
+
"version": "0.1.18-rc.31",
|
|
5
|
+
"generatedAt": "2026-09-15T12:38:15.181Z",
|
|
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 —
|
|
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,52 @@ user-invocable: false
|
|
|
8
8
|
# @owlmeans/client-payment
|
|
9
9
|
|
|
10
10
|
**Layer:** Client
|
|
11
|
-
**Install:** `"@owlmeans/client-payment": "^0.1.18-rc.
|
|
11
|
+
**Install:** `"@owlmeans/client-payment": "^0.1.18-rc.31"` in `dependencies` (peer `react`)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
The same `PaymentService` as `@owlmeans/payment`, with one method adapted for a browser. Everything
|
|
14
|
+
else — catalogue reads, entitlement helpers and protocol objects — comes from the core package.
|
|
15
|
+
Reusable checkout hooks and UI live in `@owlmeans/web-payment`; this package remains the underlying
|
|
16
|
+
browser service.
|
|
17
|
+
|
|
18
|
+
## Key exports
|
|
14
19
|
|
|
15
20
|
| Export | Description |
|
|
16
|
-
|
|
17
|
-
| `makePaymentService()` |
|
|
18
|
-
|
|
|
19
|
-
|
|
|
21
|
+
|---|---|
|
|
22
|
+
| `makePaymentService(alias?)` · `appendPaymentService(ctx, alias?)` | The client service factory and its registration helper. Same signatures as the core package's. |
|
|
23
|
+
| `SHALLOW_AUTH` | `'payment:shallow-auth'` — the record id the resolved profile is cached under. |
|
|
24
|
+
| `DEFAULT_ALIAS` | Re-exported, so a client wires the service without also importing the core package. |
|
|
25
|
+
| `PaymentService` | Re-exported type. |
|
|
26
|
+
|
|
27
|
+
## What it changes: `shallowAuthentication`
|
|
28
|
+
|
|
29
|
+
A checkout leaves the app and comes back, and the token that identified the visitor on the way out
|
|
30
|
+
is gone by the time they return. So the client override persists the answer:
|
|
31
|
+
|
|
32
|
+
- **With a token** — the core implementation reads the `profileId` out of it, then the result is
|
|
33
|
+
saved into the client auth resource (`AUTH_RESOURCE`) under `SHALLOW_AUTH`.
|
|
34
|
+
- **Without one** — the saved record is loaded instead, and its `profileId` returned. When there is
|
|
35
|
+
no record, or it carries no profile, it throws `PaymentIdentificationError`.
|
|
20
36
|
|
|
21
|
-
|
|
37
|
+
This is identification, not authorization: the token is read, never verified. Gate a paid
|
|
38
|
+
capability with `entitled(...)` on the route rather than with anything this returns.
|
|
22
39
|
|
|
23
40
|
```typescript
|
|
24
|
-
import {
|
|
25
|
-
|
|
41
|
+
import { appendPaymentService } from '@owlmeans/client-payment'
|
|
42
|
+
|
|
43
|
+
appendPaymentService(context)
|
|
26
44
|
```
|
|
27
45
|
|
|
46
|
+
Registering under the core `DEFAULT_ALIAS` is what lets shared code resolve one payment service
|
|
47
|
+
whichever side it runs on. The client auth resource must be registered too — the override reads it
|
|
48
|
+
on every call.
|
|
49
|
+
|
|
28
50
|
## Depends On
|
|
29
51
|
|
|
30
|
-
- `@owlmeans/payment
|
|
52
|
+
- `@owlmeans/payment` · `@owlmeans/client-auth` (`AUTH_RESOURCE`) · `@owlmeans/context`
|
|
53
|
+
- peer `react`
|
|
54
|
+
|
|
55
|
+
## Related
|
|
56
|
+
|
|
57
|
+
- [[payment]] — the contracts, the catalogue and the entitlement grammar
|
|
58
|
+
- `web-payment` — protocol-bound hooks, same-window checkout navigation and amount dialog
|
|
59
|
+
- [[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.
|
|
3
|
+
"version": "0.1.18-rc.31",
|
|
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.
|
|
25
|
-
"@owlmeans/context": "^0.1.18-rc.
|
|
26
|
-
"@owlmeans/payment": "^0.1.18-rc.
|
|
24
|
+
"@owlmeans/client-auth": "^0.1.18-rc.31",
|
|
25
|
+
"@owlmeans/context": "^0.1.18-rc.18",
|
|
26
|
+
"@owlmeans/payment": "^0.1.18-rc.23"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "*"
|
package/build/.gitkeep
DELETED
|
File without changes
|