@sudobility/testomniac_client 0.0.13 → 0.0.15

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 +61 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # @sudobility/testomniac_client
2
+
3
+ API client SDK for Testomniac with TanStack Query hooks for AI-powered automated UI testing.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ bun add @sudobility/testomniac_client
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { TestomniacClient, useHistories, useHistoriesTotal } from "@sudobility/testomniac_client";
15
+
16
+ const client = new TestomniacClient({ baseUrl, networkClient });
17
+
18
+ // React hook usage
19
+ const { histories, createHistory, deleteHistory } = useHistories({
20
+ client,
21
+ userId: "firebase-uid",
22
+ token,
23
+ });
24
+
25
+ const { data: total } = useHistoriesTotal({ client });
26
+ ```
27
+
28
+ ## API
29
+
30
+ ### TestomniacClient
31
+
32
+ Constructed with `{ baseUrl, networkClient }`. Uses dependency-injected `NetworkClient` for all HTTP calls.
33
+
34
+ ### Hooks
35
+
36
+ - `useHistories(config)` -- Query + mutations for user history CRUD with auto-invalidation
37
+ - `useHistoriesTotal(config)` -- Query for global total (public endpoint)
38
+
39
+ ### Cache Settings
40
+
41
+ - `staleTime`: 5 minutes, `gcTime`: 30 minutes
42
+
43
+ ## Development
44
+
45
+ ```bash
46
+ bun run build # Build ESM
47
+ bun test # Run tests
48
+ bun run verify # All checks + build
49
+ ```
50
+
51
+ ## Related Packages
52
+
53
+ - `testomniac_types` -- Shared type definitions
54
+ - `testomniac_lib` -- Business logic with Zustand stores
55
+ - `testomniac_api` -- Backend API server
56
+ - `testomniac_app` -- Web app
57
+ - `testomniac_app_rn` -- React Native app
58
+
59
+ ## License
60
+
61
+ BUSL-1.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/testomniac_client",
3
- "version": "0.0.13",
3
+ "version": "0.0.15",
4
4
  "description": "Client library for Starter API with TanStack Query hooks",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,13 +35,13 @@
35
35
  "author": "Sudobility",
36
36
  "license": "BUSL-1.1",
37
37
  "peerDependencies": {
38
- "@sudobility/types": "^1.9.55",
38
+ "@sudobility/types": "^1.9.58",
39
39
  "@tanstack/react-query": ">=5.0.0",
40
40
  "react": ">=18.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@sudobility/testomniac_types": "^0.0.8",
44
- "@sudobility/types": "^1.9.55",
43
+ "@sudobility/testomniac_types": "^0.0.10",
44
+ "@sudobility/types": "^1.9.58",
45
45
  "@tanstack/react-query": "^5.90.5",
46
46
  "@types/react": "^19.2.2",
47
47
  "react": "^19.2.1",