@sentry/api 0.255.0 → 0.257.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/README.md +31 -0
- package/dist/types.gen.d.ts +7 -7
- package/dist/valibot.d.ts +1 -0
- package/dist/valibot.gen.d.ts +17125 -0
- package/dist/valibot.js +22131 -0
- package/dist/zod.gen.d.ts +5821 -5821
- package/dist/zod.js +28 -7
- package/package.json +10 -1
package/README.md
CHANGED
|
@@ -29,6 +29,37 @@ console.log(data);
|
|
|
29
29
|
|
|
30
30
|
Auth tokens and base URLs (including self-hosted and region URLs) are documented at https://docs.sentry.io/api/auth/.
|
|
31
31
|
|
|
32
|
+
## Runtime validation
|
|
33
|
+
|
|
34
|
+
The root `@sentry/api` entry has no runtime dependencies. It provides the API client and pure TypeScript types without installing a validation library.
|
|
35
|
+
|
|
36
|
+
Valibot 1 runtime schemas are available through a separate optional entry point:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install @sentry/api valibot
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
import * as v from "valibot";
|
|
44
|
+
import { vGetProjectResponse } from "@sentry/api/valibot";
|
|
45
|
+
|
|
46
|
+
const project = v.parse(vGetProjectResponse, input);
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The existing Zod 3 entry remains supported:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install @sentry/api zod
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
import { zGetProjectResponse } from "@sentry/api/zod";
|
|
57
|
+
|
|
58
|
+
const project = zGetProjectResponse.parse(input);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`valibot` and `zod` are optional peer dependencies. Install neither when you only need the generated client and TypeScript types, or install the validator used by your application. The `@sentry/api/valibot` entry requires Valibot 1; its optional peer uses a wildcard because npm applies peer constraints to the whole package, including consumers that never import this entry.
|
|
62
|
+
|
|
32
63
|
## Error handling
|
|
33
64
|
|
|
34
65
|
Every operation with documented error responses has a generated `narrowError_<operation>` wrapper. It returns data or a `SentryApiError` that preserves the operation's status-to-body type map:
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -2263,7 +2263,7 @@ export type Detector = {
|
|
|
2263
2263
|
} | null;
|
|
2264
2264
|
description?: string | null;
|
|
2265
2265
|
id: string;
|
|
2266
|
-
projectId: string;
|
|
2266
|
+
projectId: string | null;
|
|
2267
2267
|
name: string;
|
|
2268
2268
|
type: string;
|
|
2269
2269
|
workflowIds: Array<string> | null;
|
|
@@ -4063,7 +4063,7 @@ export type ListDetectorSerializerResponse = Array<{
|
|
|
4063
4063
|
} | null;
|
|
4064
4064
|
description?: string | null;
|
|
4065
4065
|
id: string;
|
|
4066
|
-
projectId: string;
|
|
4066
|
+
projectId: string | null;
|
|
4067
4067
|
name: string;
|
|
4068
4068
|
type: string;
|
|
4069
4069
|
workflowIds: Array<string> | null;
|
|
@@ -12604,7 +12604,7 @@ export type ListOrganizationDetectorsResponses = {
|
|
|
12604
12604
|
} | null;
|
|
12605
12605
|
description?: string | null;
|
|
12606
12606
|
id: string;
|
|
12607
|
-
projectId: string;
|
|
12607
|
+
projectId: string | null;
|
|
12608
12608
|
name: string;
|
|
12609
12609
|
type: string;
|
|
12610
12610
|
workflowIds: Array<string> | null;
|
|
@@ -12695,7 +12695,7 @@ export type UpdateOrganizationDetectorsResponses = {
|
|
|
12695
12695
|
} | null;
|
|
12696
12696
|
description?: string | null;
|
|
12697
12697
|
id: string;
|
|
12698
|
-
projectId: string;
|
|
12698
|
+
projectId: string | null;
|
|
12699
12699
|
name: string;
|
|
12700
12700
|
type: string;
|
|
12701
12701
|
workflowIds: Array<string> | null;
|
|
@@ -12793,7 +12793,7 @@ export type GetOrganizationDetectorResponses = {
|
|
|
12793
12793
|
} | null;
|
|
12794
12794
|
description?: string | null;
|
|
12795
12795
|
id: string;
|
|
12796
|
-
projectId: string;
|
|
12796
|
+
projectId: string | null;
|
|
12797
12797
|
name: string;
|
|
12798
12798
|
type: string;
|
|
12799
12799
|
workflowIds: Array<string> | null;
|
|
@@ -13088,7 +13088,7 @@ export type UpdateOrganizationDetectorResponses = {
|
|
|
13088
13088
|
} | null;
|
|
13089
13089
|
description?: string | null;
|
|
13090
13090
|
id: string;
|
|
13091
|
-
projectId: string;
|
|
13091
|
+
projectId: string | null;
|
|
13092
13092
|
name: string;
|
|
13093
13093
|
type: string;
|
|
13094
13094
|
workflowIds: Array<string> | null;
|
|
@@ -19634,7 +19634,7 @@ export type CreateOrganizationProjectDetectorResponses = {
|
|
|
19634
19634
|
} | null;
|
|
19635
19635
|
description?: string | null;
|
|
19636
19636
|
id: string;
|
|
19637
|
-
projectId: string;
|
|
19637
|
+
projectId: string | null;
|
|
19638
19638
|
name: string;
|
|
19639
19639
|
type: string;
|
|
19640
19640
|
workflowIds: Array<string> | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./valibot.gen.ts";
|