@belvador/api 0.5.0 → 0.6.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/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/operations.gen.d.ts +93 -0
- package/dist/operations.gen.js +56 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OPERATIONS, type OperationId, type OperationMeta, type OperationParams } from "./operations.gen.js";
|
|
2
|
-
export declare const CLIENT_VERSION = "0.
|
|
2
|
+
export declare const CLIENT_VERSION = "0.6.0";
|
|
3
3
|
export declare const DEFAULT_BASE_URL = "https://api.belvador.dev";
|
|
4
4
|
/** Personal (`blv_pat_`), service (`blv_svc_`) or OAuth access (`blv_oat_`) token. */
|
|
5
5
|
export declare const TOKEN_PATTERN: RegExp;
|
package/dist/client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BelvadorApiError, errorFrom } from "./errors.js";
|
|
2
2
|
import { nodeErrorWord, nodeReadRequest, nodeRefusal, nodeWindowMissing, NODE_REFUSAL_STATUS, reshapeNodeAnswer, } from "./node-wire.gen.js";
|
|
3
3
|
import { OPERATIONS } from "./operations.gen.js";
|
|
4
|
-
export const CLIENT_VERSION = "0.
|
|
4
|
+
export const CLIENT_VERSION = "0.6.0";
|
|
5
5
|
export const DEFAULT_BASE_URL = "https://api.belvador.dev";
|
|
6
6
|
/** Personal (`blv_pat_`), service (`blv_svc_`) or OAuth access (`blv_oat_`) token. */
|
|
7
7
|
export const TOKEN_PATTERN = /^blv_(pat|svc|oat)_[A-Za-z0-9_-]{20,200}$/;
|
package/dist/operations.gen.d.ts
CHANGED
|
@@ -166,6 +166,22 @@ export declare const OPERATIONS: {
|
|
|
166
166
|
readonly node: null;
|
|
167
167
|
readonly defaults: {};
|
|
168
168
|
};
|
|
169
|
+
readonly "deployments.create": {
|
|
170
|
+
readonly method: "POST";
|
|
171
|
+
readonly path: "/v1/projects/{project}/deployments";
|
|
172
|
+
readonly pathParams: readonly ["project"];
|
|
173
|
+
readonly scope: "releases:write";
|
|
174
|
+
readonly kind: "node";
|
|
175
|
+
readonly sensitivity: "normal";
|
|
176
|
+
readonly idempotency: "none";
|
|
177
|
+
readonly ifMatch: false;
|
|
178
|
+
readonly paged: false;
|
|
179
|
+
readonly status: 200;
|
|
180
|
+
readonly node: {
|
|
181
|
+
readonly path: "w/releases/deployments";
|
|
182
|
+
};
|
|
183
|
+
readonly defaults: {};
|
|
184
|
+
};
|
|
169
185
|
readonly "destinations.create": {
|
|
170
186
|
readonly method: "POST";
|
|
171
187
|
readonly path: "/v1/destinations";
|
|
@@ -525,6 +541,22 @@ export declare const OPERATIONS: {
|
|
|
525
541
|
};
|
|
526
542
|
readonly defaults: {};
|
|
527
543
|
};
|
|
544
|
+
readonly "issues.fix_status": {
|
|
545
|
+
readonly method: "GET";
|
|
546
|
+
readonly path: "/v1/issues/{issue_id}/fix-status";
|
|
547
|
+
readonly pathParams: readonly ["issue_id"];
|
|
548
|
+
readonly scope: "releases:read";
|
|
549
|
+
readonly kind: "node";
|
|
550
|
+
readonly sensitivity: "normal";
|
|
551
|
+
readonly idempotency: "none";
|
|
552
|
+
readonly ifMatch: false;
|
|
553
|
+
readonly paged: false;
|
|
554
|
+
readonly status: 200;
|
|
555
|
+
readonly node: {
|
|
556
|
+
readonly path: "q/issues/{issue_id}/fix-status";
|
|
557
|
+
};
|
|
558
|
+
readonly defaults: {};
|
|
559
|
+
};
|
|
528
560
|
readonly "issues.get": {
|
|
529
561
|
readonly method: "GET";
|
|
530
562
|
readonly path: "/v1/issues/{issue_id}";
|
|
@@ -1491,6 +1523,38 @@ export declare const OPERATIONS: {
|
|
|
1491
1523
|
readonly node: null;
|
|
1492
1524
|
readonly defaults: {};
|
|
1493
1525
|
};
|
|
1526
|
+
readonly "releases.health": {
|
|
1527
|
+
readonly method: "GET";
|
|
1528
|
+
readonly path: "/v1/projects/{project}/releases/{version}/health";
|
|
1529
|
+
readonly pathParams: readonly ["project", "version"];
|
|
1530
|
+
readonly scope: "releases:read";
|
|
1531
|
+
readonly kind: "node";
|
|
1532
|
+
readonly sensitivity: "normal";
|
|
1533
|
+
readonly idempotency: "none";
|
|
1534
|
+
readonly ifMatch: false;
|
|
1535
|
+
readonly paged: false;
|
|
1536
|
+
readonly status: 200;
|
|
1537
|
+
readonly node: {
|
|
1538
|
+
readonly path: "q/releases/health";
|
|
1539
|
+
};
|
|
1540
|
+
readonly defaults: {};
|
|
1541
|
+
};
|
|
1542
|
+
readonly "releases.list": {
|
|
1543
|
+
readonly method: "GET";
|
|
1544
|
+
readonly path: "/v1/projects/{project}/releases";
|
|
1545
|
+
readonly pathParams: readonly ["project"];
|
|
1546
|
+
readonly scope: "releases:read";
|
|
1547
|
+
readonly kind: "node";
|
|
1548
|
+
readonly sensitivity: "normal";
|
|
1549
|
+
readonly idempotency: "none";
|
|
1550
|
+
readonly ifMatch: false;
|
|
1551
|
+
readonly paged: false;
|
|
1552
|
+
readonly status: 200;
|
|
1553
|
+
readonly node: {
|
|
1554
|
+
readonly path: "q/releases";
|
|
1555
|
+
};
|
|
1556
|
+
readonly defaults: {};
|
|
1557
|
+
};
|
|
1494
1558
|
readonly "service_principals.create": {
|
|
1495
1559
|
readonly method: "POST";
|
|
1496
1560
|
readonly path: "/v1/service-accounts";
|
|
@@ -2012,6 +2076,17 @@ export interface OperationParams {
|
|
|
2012
2076
|
note?: string;
|
|
2013
2077
|
}>;
|
|
2014
2078
|
};
|
|
2079
|
+
/** Record that a release was deployed to an environment (a deploy marker for CI without sentry-cli). Answers the marker and `created`; the same `deploy_id` again changes nothing (`created: false`). */
|
|
2080
|
+
"deployments.create": {
|
|
2081
|
+
project: number;
|
|
2082
|
+
version: string;
|
|
2083
|
+
environment: string;
|
|
2084
|
+
name?: string;
|
|
2085
|
+
url?: string;
|
|
2086
|
+
started_at?: string;
|
|
2087
|
+
finished_at?: string;
|
|
2088
|
+
deploy_id?: string;
|
|
2089
|
+
};
|
|
2015
2090
|
/** Start adding a Telegram, Slack, email, webhook, PagerDuty or incident.io destination; a person enters its secrets. */
|
|
2016
2091
|
"destinations.create": {
|
|
2017
2092
|
provider: "telegram" | "slack" | "email" | "webhook" | "pagerduty" | "incident_io";
|
|
@@ -2145,6 +2220,7 @@ export interface OperationParams {
|
|
|
2145
2220
|
action: {
|
|
2146
2221
|
action: "resolve";
|
|
2147
2222
|
in_next_release?: boolean;
|
|
2223
|
+
in_release?: string;
|
|
2148
2224
|
} | {
|
|
2149
2225
|
action: "unresolve";
|
|
2150
2226
|
} | {
|
|
@@ -2164,6 +2240,10 @@ export interface OperationParams {
|
|
|
2164
2240
|
priority: "low" | "medium" | "high";
|
|
2165
2241
|
};
|
|
2166
2242
|
};
|
|
2243
|
+
/** Whether a resolved issue is fixed in each environment it occurred in: fixed (a deploy of the target release and 24 h of its signals without the error), unverified, not fixed (with the event that broke it) or unknown; null while unresolved. */
|
|
2244
|
+
"issues.fix_status": {
|
|
2245
|
+
issue_id: number;
|
|
2246
|
+
};
|
|
2167
2247
|
/** One issue with its 24 h and 30 d counts. */
|
|
2168
2248
|
"issues.get": {
|
|
2169
2249
|
issue_id: number;
|
|
@@ -2198,6 +2278,7 @@ export interface OperationParams {
|
|
|
2198
2278
|
} & ((Record<string, unknown>) & ({
|
|
2199
2279
|
action: "resolve";
|
|
2200
2280
|
in_next_release?: boolean;
|
|
2281
|
+
in_release?: string;
|
|
2201
2282
|
} | {
|
|
2202
2283
|
action: "unresolve";
|
|
2203
2284
|
} | {
|
|
@@ -2832,6 +2913,18 @@ export interface OperationParams {
|
|
|
2832
2913
|
primary_environment: string;
|
|
2833
2914
|
allow_code_monitors: boolean;
|
|
2834
2915
|
};
|
|
2916
|
+
/** One release in one environment against the previous one (or `compare`): new, regressed and increased issues in its first 24 hours (≤ 50 each, with hourly sparklines) and its deploy markers. */
|
|
2917
|
+
"releases.health": {
|
|
2918
|
+
project: number;
|
|
2919
|
+
version: string;
|
|
2920
|
+
environment?: string;
|
|
2921
|
+
compare?: string;
|
|
2922
|
+
};
|
|
2923
|
+
/** Releases of one project in one environment, newest first by deploy order (else version order): first and last deploy, events, issues, and the counts of new, regressed and increased issues in each release's first 24 hours. */
|
|
2924
|
+
"releases.list": {
|
|
2925
|
+
project: number;
|
|
2926
|
+
environment?: string;
|
|
2927
|
+
};
|
|
2835
2928
|
/** Create a service account. */
|
|
2836
2929
|
"service_principals.create": {
|
|
2837
2930
|
name: string;
|
package/dist/operations.gen.js
CHANGED
|
@@ -142,6 +142,20 @@ export const OPERATIONS = {
|
|
|
142
142
|
node: null,
|
|
143
143
|
defaults: {},
|
|
144
144
|
},
|
|
145
|
+
"deployments.create": {
|
|
146
|
+
method: "POST",
|
|
147
|
+
path: "/v1/projects/{project}/deployments",
|
|
148
|
+
pathParams: ["project"],
|
|
149
|
+
scope: "releases:write",
|
|
150
|
+
kind: "node",
|
|
151
|
+
sensitivity: "normal",
|
|
152
|
+
idempotency: "none",
|
|
153
|
+
ifMatch: false,
|
|
154
|
+
paged: false,
|
|
155
|
+
status: 200,
|
|
156
|
+
node: { path: "w/releases/deployments" },
|
|
157
|
+
defaults: {},
|
|
158
|
+
},
|
|
145
159
|
"destinations.create": {
|
|
146
160
|
method: "POST",
|
|
147
161
|
path: "/v1/destinations",
|
|
@@ -492,6 +506,20 @@ export const OPERATIONS = {
|
|
|
492
506
|
node: { path: "w/issues/bulk" },
|
|
493
507
|
defaults: {},
|
|
494
508
|
},
|
|
509
|
+
"issues.fix_status": {
|
|
510
|
+
method: "GET",
|
|
511
|
+
path: "/v1/issues/{issue_id}/fix-status",
|
|
512
|
+
pathParams: ["issue_id"],
|
|
513
|
+
scope: "releases:read",
|
|
514
|
+
kind: "node",
|
|
515
|
+
sensitivity: "normal",
|
|
516
|
+
idempotency: "none",
|
|
517
|
+
ifMatch: false,
|
|
518
|
+
paged: false,
|
|
519
|
+
status: 200,
|
|
520
|
+
node: { path: "q/issues/{issue_id}/fix-status" },
|
|
521
|
+
defaults: {},
|
|
522
|
+
},
|
|
495
523
|
"issues.get": {
|
|
496
524
|
method: "GET",
|
|
497
525
|
path: "/v1/issues/{issue_id}",
|
|
@@ -1416,6 +1444,34 @@ export const OPERATIONS = {
|
|
|
1416
1444
|
node: null,
|
|
1417
1445
|
defaults: {},
|
|
1418
1446
|
},
|
|
1447
|
+
"releases.health": {
|
|
1448
|
+
method: "GET",
|
|
1449
|
+
path: "/v1/projects/{project}/releases/{version}/health",
|
|
1450
|
+
pathParams: ["project", "version"],
|
|
1451
|
+
scope: "releases:read",
|
|
1452
|
+
kind: "node",
|
|
1453
|
+
sensitivity: "normal",
|
|
1454
|
+
idempotency: "none",
|
|
1455
|
+
ifMatch: false,
|
|
1456
|
+
paged: false,
|
|
1457
|
+
status: 200,
|
|
1458
|
+
node: { path: "q/releases/health" },
|
|
1459
|
+
defaults: {},
|
|
1460
|
+
},
|
|
1461
|
+
"releases.list": {
|
|
1462
|
+
method: "GET",
|
|
1463
|
+
path: "/v1/projects/{project}/releases",
|
|
1464
|
+
pathParams: ["project"],
|
|
1465
|
+
scope: "releases:read",
|
|
1466
|
+
kind: "node",
|
|
1467
|
+
sensitivity: "normal",
|
|
1468
|
+
idempotency: "none",
|
|
1469
|
+
ifMatch: false,
|
|
1470
|
+
paged: false,
|
|
1471
|
+
status: 200,
|
|
1472
|
+
node: { path: "q/releases" },
|
|
1473
|
+
defaults: {},
|
|
1474
|
+
},
|
|
1419
1475
|
"service_principals.create": {
|
|
1420
1476
|
method: "POST",
|
|
1421
1477
|
path: "/v1/service-accounts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@belvador/api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Typed client for the Belvador API (api.belvador.dev, OpenAPI 3.1): every operation by operationId, problem+json errors, retries, and node reads straight from the edge with short-lived tickets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Belvador (https://belvador.dev)",
|