@connekz/connekz-agent 1.3.2 → 1.3.5

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@connekz/connekz-agent",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "1.3.2",
5
+ "version": "1.3.5",
6
6
  "description": "A package for Connekz clients to integrate Connekz Agent into their applications.",
7
7
  "main": "./dist/connekz-agent.umd.js",
8
8
  "module": "./dist/connekz-agent.es.js",
@@ -36,6 +36,9 @@
36
36
  "lint": "eslint . --fix",
37
37
  "format": "prettier --write src/",
38
38
  "build:test": "cross-env NODE_ENV=development node --experimental-modules commands/build-test.mjs",
39
+ "test": "vitest run",
40
+ "test:watch": "vitest",
41
+ "test:coverage": "vitest run --coverage",
39
42
  "clean": "rm -rf dist",
40
43
  "publish": "node --experimental-modules commands/publish.mjs"
41
44
  },
@@ -68,6 +71,7 @@
68
71
  "vue": "^3.5.13"
69
72
  },
70
73
  "devDependencies": {
74
+ "@pinia/testing": "^1.0.3",
71
75
  "@tsconfig/node22": "^22.0.1",
72
76
  "@types/markdown-it": "^14.1.2",
73
77
  "@types/node": "^22.14.0",
@@ -75,6 +79,7 @@
75
79
  "@vitejs/plugin-vue": "^5.2.3",
76
80
  "@vue/eslint-config-prettier": "^10.1.0",
77
81
  "@vue/eslint-config-typescript": "^14.3.0",
82
+ "@vue/test-utils": "^2.4.6",
78
83
  "@vue/tsconfig": "^0.7.0",
79
84
  "autoprefixer": "^10.4.21",
80
85
  "cross-env": "^7.0.3",
@@ -82,6 +87,7 @@
82
87
  "eslint-plugin-vue": "^9.32.0",
83
88
  "fs-extra": "^11.3.0",
84
89
  "globals": "^16.0.0",
90
+ "happy-dom": "^20.6.1",
85
91
  "npm-run-all2": "^7.0.2",
86
92
  "postcss": "^8.5.3",
87
93
  "prettier": "^3.4.2",
@@ -91,6 +97,7 @@
91
97
  "vite": "^6.2.4",
92
98
  "vite-plugin-dts": "^4.5.4",
93
99
  "vite-plugin-vue-devtools": "^7.7.2",
100
+ "vitest": "^3.2.4",
94
101
  "vue-tsc": "^2.2.8"
95
102
  }
96
103
  }
package/types.d.ts CHANGED
@@ -58,8 +58,24 @@ export type ConnectionQuality = {
58
58
  effectiveType: string | null;
59
59
  };
60
60
 
61
+ /**
62
+ * Error codes for Connekz Agent errors.
63
+ *
64
+ * CNKZ_ERR_1001 - Unable to reach the Connekz server (wrong URL, server down, network issue)
65
+ * CNKZ_ERR_1002 - Invalid client ID or client secret
66
+ * CNKZ_ERR_1003 - Usage quota exceeded (out of tokens)
67
+ * CNKZ_ERR_1004 - Weak network connection (voice unreliable)
68
+ * CNKZ_ERR_1005 - Agent runtime error
69
+ */
70
+ export type ConnekzErrorCode =
71
+ | 'CNKZ_ERR_1001'
72
+ | 'CNKZ_ERR_1002'
73
+ | 'CNKZ_ERR_1003'
74
+ | 'CNKZ_ERR_1004'
75
+ | 'CNKZ_ERR_1005';
76
+
61
77
  export type ConnekzError = {
62
- code: string;
78
+ code: ConnekzErrorCode;
63
79
  message: string;
64
80
  timestamp: number;
65
81
  };