@sentry/api 0.410.0 → 0.412.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 +19 -0
- package/dist/operation-types.d.ts +36 -0
- package/dist/operations.d.ts +4 -0
- package/dist/operations.js +8378 -0
- package/dist/zod.gen.d.ts +22 -22
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -83,6 +83,25 @@ const dataset: ListOrganizationTraceItemAttributesQueryDataset = "spans";
|
|
|
83
83
|
const types: ListOrganizationTraceItemAttributesQueryAttributeType[] = ["string", "number"];
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
### Operation discovery
|
|
87
|
+
|
|
88
|
+
`@sentry/api/operations` exports a readonly catalog for offline discovery, without importing the client, validators, or transport:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { operations } from "@sentry/api/operations";
|
|
92
|
+
|
|
93
|
+
const logOperations = operations.filter(operation =>
|
|
94
|
+
operation.queryParameters.some(parameter =>
|
|
95
|
+
parameter.name === "dataset" && parameter.enum?.includes("logs"),
|
|
96
|
+
),
|
|
97
|
+
);
|
|
98
|
+
console.log(logOperations.map(({ functionName, method, path }) => ({ functionName, method, path })));
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Each `ApiOperation` records the actual exported `functionName`, original OpenAPI `operationId`, method, path, summary, description, tags, path parameter names, query metadata, and explicit deprecation flag. `ApiQueryParameter` includes the name, required flag, description, type, and declared enum values (item values for arrays). Operation parameters override inherited path parameters.
|
|
102
|
+
|
|
103
|
+
The catalog is generated from the same schema and SDK output as each release. Consumers own search, grouping, ranking, and command aliases; the catalog does not fetch a live schema or infer undocumented API behavior.
|
|
104
|
+
|
|
86
105
|
### Browser sessions
|
|
87
106
|
|
|
88
107
|
The browser helper configures session cookies and CSRF token injection:
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Searchable query metadata from the release's OpenAPI specification. */
|
|
2
|
+
export type ApiQueryParameter = {
|
|
3
|
+
/** Parameter name accepted by the operation. */
|
|
4
|
+
readonly name: string;
|
|
5
|
+
/** Whether the request must include this parameter. */
|
|
6
|
+
readonly required: boolean;
|
|
7
|
+
/** Usage description, when documented. */
|
|
8
|
+
readonly description?: string;
|
|
9
|
+
/** OpenAPI schema type, when declared. */
|
|
10
|
+
readonly type?: string;
|
|
11
|
+
/** Allowed scalar values, or allowed item values for an array parameter. */
|
|
12
|
+
readonly enum?: readonly (string | number | boolean | null)[];
|
|
13
|
+
};
|
|
14
|
+
/** An operation shipped by this SDK version, without consumer-specific policy. */
|
|
15
|
+
export type ApiOperation = {
|
|
16
|
+
/** Actual exported SDK function name, after name normalization. */
|
|
17
|
+
readonly functionName: string;
|
|
18
|
+
/** Original OpenAPI identifier; an empty string means it was not declared. */
|
|
19
|
+
readonly operationId: string;
|
|
20
|
+
/** HTTP method used by the generated operation. */
|
|
21
|
+
readonly method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "TRACE";
|
|
22
|
+
/** Canonical OpenAPI path including parameter placeholders. */
|
|
23
|
+
readonly path: string;
|
|
24
|
+
/** Short operation description, when documented. */
|
|
25
|
+
readonly summary?: string;
|
|
26
|
+
/** Detailed operation description; empty when undocumented. */
|
|
27
|
+
readonly description: string;
|
|
28
|
+
/** Categories assigned by the OpenAPI specification. */
|
|
29
|
+
readonly tags?: readonly string[];
|
|
30
|
+
/** Parameter names occurring in the path template. */
|
|
31
|
+
readonly pathParameters: readonly string[];
|
|
32
|
+
/** Query parameters after applying operation overrides to path-level parameters. */
|
|
33
|
+
readonly queryParameters: readonly ApiQueryParameter[];
|
|
34
|
+
/** Whether OpenAPI explicitly marks the operation deprecated. */
|
|
35
|
+
readonly deprecated: boolean;
|
|
36
|
+
};
|