@buildinternet/releases-api-types 0.44.0 → 0.45.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/package.json +2 -2
- package/src/api-types.ts +10 -0
- package/src/schemas/orgs.ts +2 -0
- package/src/schemas/releases.ts +3 -0
- package/src/schemas/shared.ts +15 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildinternet/releases-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Wire protocol — request/response types for the Releases registry API. Shared by web, workers, and clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@buildinternet/releases-core": "^0.
|
|
20
|
+
"@buildinternet/releases-core": "^0.26.0",
|
|
21
21
|
"zod": "^4.4.3"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
package/src/api-types.ts
CHANGED
|
@@ -888,6 +888,12 @@ export interface ReleaseDetail {
|
|
|
888
888
|
breaking?: BreakingLevel;
|
|
889
889
|
/** Explicit upgrade/migration steps lifted from the body (#1696); null when the body gives none. */
|
|
890
890
|
migrationNotes?: string | null;
|
|
891
|
+
/**
|
|
892
|
+
* AI-scored release importance, 1 (housekeeping) to 5 (landmark). Scored at
|
|
893
|
+
* ingest by the release-content pass; fail-open — null/absent means not
|
|
894
|
+
* scored. Additive — older servers omit it.
|
|
895
|
+
*/
|
|
896
|
+
importance?: number | null;
|
|
891
897
|
url: string | null;
|
|
892
898
|
/**
|
|
893
899
|
* Canonical releases.sh detail-page URL (friendly form: ID + current
|
|
@@ -1537,6 +1543,8 @@ export interface ReleaseWithSource {
|
|
|
1537
1543
|
titleGenerated?: string | null;
|
|
1538
1544
|
/** AI-generated smart-brevity headline (#852, renamed in #860). */
|
|
1539
1545
|
titleShort?: string | null;
|
|
1546
|
+
/** AI-scored importance 1–5. See {@link ReleaseDetail.importance}. */
|
|
1547
|
+
importance?: number | null;
|
|
1540
1548
|
url: string | null;
|
|
1541
1549
|
contentHash: string | null;
|
|
1542
1550
|
metadata: string | null;
|
|
@@ -1580,6 +1588,8 @@ export interface LatestRelease {
|
|
|
1580
1588
|
titleGenerated?: string | null;
|
|
1581
1589
|
/** AI-generated smart-brevity headline (#852, renamed in #860). */
|
|
1582
1590
|
titleShort?: string | null;
|
|
1591
|
+
/** AI-scored importance 1–5. See {@link ReleaseDetail.importance}. */
|
|
1592
|
+
importance?: number | null;
|
|
1583
1593
|
media: MediaItem[];
|
|
1584
1594
|
/**
|
|
1585
1595
|
* Cached release-body size — `LENGTH(content)` and `countTokensSafe(content)`
|
package/src/schemas/orgs.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { BREAKING_LEVELS } from "@buildinternet/releases-core/breaking";
|
|
|
4
4
|
import {
|
|
5
5
|
AppStoreSourceInfoSchema,
|
|
6
6
|
CategorySchema,
|
|
7
|
+
ImportanceScoreSchema,
|
|
7
8
|
ListResponseSchema,
|
|
8
9
|
NoticeSchema,
|
|
9
10
|
OrgStatusSchema,
|
|
@@ -459,6 +460,7 @@ export const OrgRecentReleaseItemSchema = z.object({
|
|
|
459
460
|
* means not classified. List paths carry `breaking` only.
|
|
460
461
|
*/
|
|
461
462
|
breaking: z.enum(BREAKING_LEVELS).optional(),
|
|
463
|
+
importance: ImportanceScoreSchema,
|
|
462
464
|
url: z.string().nullable(),
|
|
463
465
|
contentHash: z.string().nullable(),
|
|
464
466
|
metadata: z.string().nullable(),
|
package/src/schemas/releases.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { BREAKING_LEVELS } from "@buildinternet/releases-core/breaking";
|
|
|
4
4
|
import { KIND_VALUES } from "@buildinternet/releases-core/kinds";
|
|
5
5
|
import {
|
|
6
6
|
AppStoreSourceInfoSchema,
|
|
7
|
+
ImportanceScoreSchema,
|
|
7
8
|
MediaItemSchema,
|
|
8
9
|
ReleaseCompositionSchema,
|
|
9
10
|
ReleaseThumbnailSchema,
|
|
@@ -71,6 +72,7 @@ export const ReleaseLatestItemSchema = z.object({
|
|
|
71
72
|
* `migrationNotes` stays detail-route-only to keep list payloads slim.
|
|
72
73
|
*/
|
|
73
74
|
breaking: z.enum(BREAKING_LEVELS).optional(),
|
|
75
|
+
importance: ImportanceScoreSchema,
|
|
74
76
|
publishedAt: z.string().nullable(),
|
|
75
77
|
url: z.string().nullable(),
|
|
76
78
|
/**
|
|
@@ -260,6 +262,7 @@ export const ReleaseDetailResponseSchema = z.object({
|
|
|
260
262
|
* `ReleaseDetail.breaking` in api-types.ts.
|
|
261
263
|
*/
|
|
262
264
|
breaking: z.enum(BREAKING_LEVELS).optional(),
|
|
265
|
+
importance: ImportanceScoreSchema,
|
|
263
266
|
/**
|
|
264
267
|
* Explicit upgrade/migration steps lifted from the body (#1696); omitted
|
|
265
268
|
* when the body gives none. Detail-route-only — list paths never carry it.
|
package/src/schemas/shared.ts
CHANGED
|
@@ -3,9 +3,23 @@ import { RELEASE_TYPES } from "@buildinternet/releases-core/schema";
|
|
|
3
3
|
import { BREAKING_LEVELS } from "@buildinternet/releases-core/breaking";
|
|
4
4
|
import { CATEGORIES } from "@buildinternet/releases-core/categories";
|
|
5
5
|
import { isValidNoticeCoordinate } from "@buildinternet/releases-core/notice";
|
|
6
|
+
import { IMPORTANCE_MAX, IMPORTANCE_MIN } from "@buildinternet/releases-core/importance";
|
|
6
7
|
|
|
7
8
|
export const CategorySchema = z.enum(CATEGORIES);
|
|
8
9
|
|
|
10
|
+
/**
|
|
11
|
+
* AI-scored release importance, 1 (housekeeping) to 5 (landmark). Scored at
|
|
12
|
+
* ingest; `.nullable().optional()` — null when unscored, absent on older
|
|
13
|
+
* servers/pinned workers.
|
|
14
|
+
*/
|
|
15
|
+
export const ImportanceScoreSchema = z
|
|
16
|
+
.number()
|
|
17
|
+
.int()
|
|
18
|
+
.min(IMPORTANCE_MIN)
|
|
19
|
+
.max(IMPORTANCE_MAX)
|
|
20
|
+
.nullable()
|
|
21
|
+
.optional();
|
|
22
|
+
|
|
9
23
|
export const MediaItemSchema = z.object({
|
|
10
24
|
type: z.enum(["image", "video", "gif"]),
|
|
11
25
|
url: z.string(),
|
|
@@ -147,6 +161,7 @@ export const ReleaseItemSchema = z.object({
|
|
|
147
161
|
// classified (the fail-open default). List paths carry `breaking` only —
|
|
148
162
|
// `migrationNotes` stays detail-route-only to keep list payloads slim.
|
|
149
163
|
breaking: z.enum(BREAKING_LEVELS).optional(),
|
|
164
|
+
importance: ImportanceScoreSchema,
|
|
150
165
|
// Count of demoted siblings rolling up into this row via `release_coverage`
|
|
151
166
|
// (0 when standalone). Lets list views show a cluster indicator without a
|
|
152
167
|
// detail-page round trip. `.optional()` — older API responses and pinned
|