@exodus/analytics-validation 1.11.0 → 1.13.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
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.13.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@1.11.0...@exodus/analytics-validation@1.13.0) (2023-07-07)
7
+
8
+ ### Features
9
+
10
+ - add WalletAssetIrreversibleModalView event validation ([#2134](https://github.com/ExodusMovement/exodus-hydra/issues/2134)) ([0a87b14](https://github.com/ExodusMovement/exodus-hydra/commit/0a87b1497600999e831248a12216233ad56c44fe))
11
+
12
+ ### Bug Fixes
13
+
14
+ - use `anyOf` instead of `oneOf` in the master schema ([#2342](https://github.com/ExodusMovement/exodus-hydra/issues/2342)) ([2133642](https://github.com/ExodusMovement/exodus-hydra/commit/21336426db17893f600c38dd73deda8e4fa6cd90))
15
+
16
+ ## [1.12.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@1.11.0...@exodus/analytics-validation@1.12.0) (2023-07-05)
17
+
18
+ ### Features
19
+
20
+ - add WalletAssetIrreversibleModalView event validation ([#2134](https://github.com/ExodusMovement/exodus-hydra/issues/2134)) ([0a87b14](https://github.com/ExodusMovement/exodus-hydra/commit/0a87b1497600999e831248a12216233ad56c44fe))
21
+
6
22
  ## [1.11.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/analytics-validation@1.10.0...@exodus/analytics-validation@1.11.0) (2023-06-23)
7
23
 
8
24
  ### Features
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@exodus/analytics-validation",
3
- "version": "1.11.0",
4
- "description": "The analytics-validation library",
5
- "author": "Exodus Movement Inc",
3
+ "version": "1.13.0",
4
+ "description": "JSON schemas for analytics events, to prevent sensitive data from being sent up to the infamous cloud",
5
+ "author": "Exodus Movement Inc.",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/ExodusMovement/exodus-hydra.git"
@@ -15,7 +15,7 @@
15
15
  "main": "./index.js",
16
16
  "files": [
17
17
  "src",
18
- "!**/__tests__",
18
+ "!**/__tests__/**",
19
19
  "schemasafe.config.js",
20
20
  "index.js",
21
21
  "README.md",
@@ -30,8 +30,8 @@
30
30
  "devDependencies": {
31
31
  "@exodus/schemasafe": "^1.0.0",
32
32
  "@exodus/schemasafe-babel-plugin": "^0.0.1",
33
- "eslint": "^8.33.0",
33
+ "eslint": "^8.44.0",
34
34
  "jest": "^29.1.2"
35
35
  },
36
- "gitHead": "b9d110d56ea1005aefab757340d77cb5817b0987"
36
+ "gitHead": "09c76f221d5d912545b5af8007156802d52be546"
37
37
  }
@@ -33,6 +33,7 @@ const osRegEx = /^(\d+\.)?(\d+\.)?(\d+)$/
33
33
  // NOTE: this is exported so consumers can use the same settings at runtime
34
34
  // as were used to compile schemas at build time
35
35
  module.exports = {
36
+ extraFormats: true,
36
37
  formats: {
37
38
  'any-string': (str) => typeof str === 'string',
38
39
  'semver-string': semVerRegEx,
@@ -11,7 +11,7 @@
11
11
  "pattern": "^.*$"
12
12
  }
13
13
  },
14
- "oneOf": [
14
+ "anyOf": [
15
15
  {
16
16
  "$ref": "asset-network-manual-refresh#"
17
17
  },
@@ -303,6 +303,9 @@
303
303
  {
304
304
  "$ref": "telemetry-collection-decision#"
305
305
  },
306
+ {
307
+ "$ref": "wallet-asset-irreversible-modal-view#"
308
+ },
306
309
  {
307
310
  "$ref": "wallet-asset-manager-toggle#"
308
311
  },
@@ -0,0 +1,37 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "event": {
6
+ "const": "WalletAssetIrreversibleModalView"
7
+ },
8
+ "properties": {
9
+ "allOf": [
10
+ {
11
+ "$ref": "common-properties#"
12
+ }
13
+ ],
14
+ "type": "object",
15
+ "required": ["asset_name", "amount", "amount_usd", "network"],
16
+ "properties": {
17
+ "asset_name": {
18
+ "type": "string",
19
+ "format": "any-string"
20
+ },
21
+ "amount": {
22
+ "type": "number"
23
+ },
24
+ "amount_usd": {
25
+ "type": "number"
26
+ },
27
+ "network": {
28
+ "type": "string",
29
+ "format": "any-string"
30
+ }
31
+ },
32
+ "unevaluatedProperties": false
33
+ }
34
+ },
35
+ "unevaluatedProperties": false,
36
+ "required": ["event", "properties"]
37
+ }