@qredex/angular 1.0.0 → 1.0.2

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.
Files changed (2) hide show
  1. package/README.md +1 -27
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -34,33 +34,7 @@ npm install @qredex/angular
34
34
 
35
35
  ## Attribution Flow
36
36
 
37
- ```mermaid
38
- sequenceDiagram
39
- participant User
40
- participant Bootstrap as App bootstrap
41
- participant Component as Cart component
42
- participant Agent as QredexAgent
43
-
44
- Bootstrap->>Agent: provideQredexAgent()
45
- User->>Component: Land with ?qdx_intent=iit_xxx
46
- Component->>Agent: injectQredexAgent()
47
- Note right of Agent: Captures IIT automatically<br/>No function call needed
48
-
49
- User->>Component: Cart item count changes
50
- Component->>Agent: agent.handleCartChange({ itemCount, previousCount })
51
- Note right of Agent: Locks IIT to PIT internally when lockable
52
-
53
- User->>Component: Checkout
54
- Component->>Agent: agent.getPurchaseIntentToken()
55
- Note right of Component: Send PIT with the order to your backend
56
-
57
- User->>Component: Cart is cleared
58
- Component->>Agent: agent.handleCartEmpty()
59
-
60
- opt No cart-empty step after checkout
61
- Component->>Agent: agent.handlePaymentSuccess()
62
- end
63
- ```
37
+ ![Angular wrapper attribution flow](https://raw.githubusercontent.com/Qredex/qredex-agent/main/docs/diagrams/angular-attribution-sequence.svg)
64
38
 
65
39
  Call `provideQredexAgent()` once at bootstrap, get the runtime with `injectQredexAgent()`, then forward merchant cart state with `agent.handleCartChange(...)`, read the PIT with `agent.getPurchaseIntentToken()`, and clear attribution with `agent.handleCartEmpty()`. Only call `agent.handlePaymentSuccess()` if your platform has no cart-empty step after checkout.
66
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qredex/angular",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Angular wrapper for Qredex Agent",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -22,7 +22,7 @@
22
22
  "build": "tsc -p tsconfig.json"
23
23
  },
24
24
  "dependencies": {
25
- "@qredex/agent": "^1.0.0"
25
+ "@qredex/agent": "^1.0.2"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@qredex/agent": "file:../.."