@bugbug-io/api-schema 14.0.7 → 14.0.8
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/README.md +21 -28
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-

|
|
1
|
+

|
|
4
2
|
|
|
5
3
|
# BugBug API Schema
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
TypeScript types and Zod schemas for the [BugBug](https://bugbug.io) API, generated from the OpenAPI specification.
|
|
10
|
-
|
|
11
|
-
</div>
|
|
5
|
+
`@bugbug-io/api-schema` provides published TypeScript types and Zod schemas for
|
|
6
|
+
building BugBug integrations.
|
|
12
7
|
|
|
13
|
-
|
|
8
|
+
```sh
|
|
9
|
+
npm install @bugbug-io/api-schema
|
|
10
|
+
```
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
- **Zod schemas**: Runtime validation for tests, suites, runs, profiles, steps, selectors, and enums
|
|
17
|
-
- **Single source of truth**: Shared contracts consumed by the SDK, CLI, and MCP server
|
|
12
|
+
## Use it when
|
|
18
13
|
|
|
19
|
-
|
|
14
|
+
- You need TypeScript types generated from BugBug's OpenAPI contract.
|
|
15
|
+
- You want to validate BugBug tests, suites, runs, profiles, steps, selectors,
|
|
16
|
+
or enums at runtime with Zod.
|
|
17
|
+
- You are building tooling that needs the same API shapes as the official SDK.
|
|
20
18
|
|
|
21
|
-
|
|
19
|
+
## Schema imports
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
- `@bugbug-io/api-schema/schemas/selectors`
|
|
25
|
-
- `@bugbug-io/api-schema/schemas/tests`
|
|
26
|
-
- `@bugbug-io/api-schema/schemas/suites`
|
|
27
|
-
- `@bugbug-io/api-schema/schemas/profiles`
|
|
28
|
-
- `@bugbug-io/api-schema/schemas/runs`
|
|
29
|
-
- `@bugbug-io/api-schema/schemas/enums`
|
|
21
|
+
Import grouped schemas from subpath exports:
|
|
30
22
|
|
|
31
|
-
|
|
23
|
+
```ts
|
|
24
|
+
import { TestSchema } from '@bugbug-io/api-schema/schemas/tests';
|
|
25
|
+
import { StepSchema } from '@bugbug-io/api-schema/schemas/steps';
|
|
26
|
+
```
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
Other available groups are `selectors`, `suites`, `profiles`, `runs`, and
|
|
29
|
+
`enums`.
|
|
34
30
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
- `npm run sync:dev` — sync from local backend
|
|
38
|
-
- `npm run sync:step-error-codes` — sync step error codes
|
|
39
|
-
- `npm run sync:all` — sync everything
|
|
31
|
+
For a higher-level API client, use [@bugbug-io/sdk](../sdk). Using the SDK access requires
|
|
32
|
+
a BugBug Business plan.
|