@echoxyz/sonar-react 0.8.0 → 0.10.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @echoxyz/sonar-react
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cbf7964: Support new V2 permit
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [cbf7964]
12
+ - @echoxyz/sonar-core@0.9.0
13
+
14
+ ## 0.9.0
15
+
16
+ ### Minor Changes
17
+
18
+ - f1c6ddd: Added refresh token endpoint. Aligned to new response type shapes.
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [f1c6ddd]
23
+ - @echoxyz/sonar-core@0.8.0
24
+
3
25
  ## 0.8.0
4
26
 
5
27
  ### Minor Changes
package/README.md CHANGED
@@ -175,7 +175,7 @@ function PurchaseButton({
175
175
  const response = await generatePurchasePermit();
176
176
  const r = response as unknown as {
177
177
  Signature: string;
178
- PermitJSON: AllocationPermit;
178
+ PermitJSON: BasicPermitV2;
179
179
  };
180
180
  if (r.Signature && r.PermitJSON) {
181
181
  console.log(permit.Signature, permit.Permit);
package/dist/index.cjs CHANGED
@@ -75,12 +75,12 @@ function SonarProvider({ children, config }) {
75
75
  if (state !== expectedState || !codeVerifier) {
76
76
  throw new Error("Invalid OAuth state or missing verifier");
77
77
  }
78
- const { token } = await client.exchangeAuthorizationCode({
78
+ const { access_token } = await client.exchangeAuthorizationCode({
79
79
  code,
80
80
  codeVerifier,
81
81
  redirectURI: config.redirectURI
82
82
  });
83
- client.setToken(token);
83
+ client.setToken(access_token);
84
84
  window.sessionStorage.removeItem("sonar:oauth:state");
85
85
  window.sessionStorage.removeItem("sonar:oauth:verifier");
86
86
  },
package/dist/index.js CHANGED
@@ -44,12 +44,12 @@ function SonarProvider({ children, config }) {
44
44
  if (state !== expectedState || !codeVerifier) {
45
45
  throw new Error("Invalid OAuth state or missing verifier");
46
46
  }
47
- const { token } = await client.exchangeAuthorizationCode({
47
+ const { access_token } = await client.exchangeAuthorizationCode({
48
48
  code,
49
49
  codeVerifier,
50
50
  redirectURI: config.redirectURI
51
51
  });
52
- client.setToken(token);
52
+ client.setToken(access_token);
53
53
  window.sessionStorage.removeItem("sonar:oauth:state");
54
54
  window.sessionStorage.removeItem("sonar:oauth:verifier");
55
55
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@echoxyz/sonar-react",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -16,7 +16,7 @@
16
16
  "react": ">=18"
17
17
  },
18
18
  "dependencies": {
19
- "@echoxyz/sonar-core": "0.7.0"
19
+ "@echoxyz/sonar-core": "0.9.0"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@testing-library/react": "^16.0.0",