@buildinternet/releases-api-types 0.54.0 → 0.55.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 +2 -0
- package/package.json +2 -2
- package/src/api-types.ts +1 -1
- package/src/schemas/collections.ts +8 -1
- package/src/schemas/search.ts +1 -1
- package/src/schemas/taxonomy.ts +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @buildinternet/releases-api-types
|
|
2
2
|
|
|
3
|
+
**Scope:** request/response wire types for the public API worker — types only, zero runtime dependencies. No request logic, no client code, no server handlers.
|
|
4
|
+
|
|
3
5
|
Wire protocol types for the [Releases](https://releases.sh) registry API.
|
|
4
6
|
|
|
5
7
|
Pure TypeScript types — zero runtime dependencies — describing request/response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildinternet/releases-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.55.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.31.
|
|
20
|
+
"@buildinternet/releases-core": "^0.31.1",
|
|
21
21
|
"zod": "^4.4.3"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
package/src/api-types.ts
CHANGED
|
@@ -1770,7 +1770,7 @@ export type TagDetail = z.infer<typeof TagDetailSchema>;
|
|
|
1770
1770
|
/**
|
|
1771
1771
|
* Aggregated release feed row for a category rollup — same wire shape as
|
|
1772
1772
|
* `CollectionReleaseItem` (both surfaces use `formatAggregateReleaseRow` in
|
|
1773
|
-
* `
|
|
1773
|
+
* `apps/api/src/utils.ts`). Aliased rather than duplicated so renderers
|
|
1774
1774
|
* can treat them as one.
|
|
1775
1775
|
*/
|
|
1776
1776
|
export type CategoryReleaseItem = CollectionReleaseItem;
|
|
@@ -302,9 +302,16 @@ export const DigestSectionSchema = z.object({
|
|
|
302
302
|
lede: z.string(),
|
|
303
303
|
/** Cited release ids in first-seen order; resolve against the detail's `releases`. */
|
|
304
304
|
releaseIds: z.array(z.string()),
|
|
305
|
+
/**
|
|
306
|
+
* The section's cited releases, resolved server-side in `releaseIds` order.
|
|
307
|
+
* Ids that no longer resolve are dropped, so `releases.length` can be less
|
|
308
|
+
* than `releaseIds.length`. Optional for older servers.
|
|
309
|
+
*/
|
|
310
|
+
releases: z.array(DigestCoveredReleaseSchema).optional(),
|
|
305
311
|
});
|
|
306
312
|
|
|
307
|
-
/** Full row returned by `GET /v1/collections/:slug/digests/:weekStart
|
|
313
|
+
/** Full row returned by `GET /v1/collections/:slug/digests/:weekStart` and
|
|
314
|
+
* `GET /v1/collections/:slug/digests/latest`. */
|
|
308
315
|
export const CollectionWeeklyDigestDetailSchema = z.object({
|
|
309
316
|
id: z.string(),
|
|
310
317
|
weekStart: z.string(),
|
package/src/schemas/search.ts
CHANGED
|
@@ -114,7 +114,7 @@ export const SearchReleaseHitSchema = z.object({
|
|
|
114
114
|
* The release's upstream source URL, when it has one. Lets the web link
|
|
115
115
|
* search/lookup hits straight to the original page instead of the
|
|
116
116
|
* noindexed `/release/<id>` stub — see `releaseLinkProps()` in
|
|
117
|
-
* `web/src/lib/release-link.ts`. Optional for older servers / mid-deploy
|
|
117
|
+
* `apps/web/src/lib/release-link.ts`. Optional for older servers / mid-deploy
|
|
118
118
|
* pin tolerance.
|
|
119
119
|
*/
|
|
120
120
|
url: z.string().nullable().optional(),
|
package/src/schemas/taxonomy.ts
CHANGED
|
@@ -95,7 +95,7 @@ export const UpdateCategoryResponseSchema = z.object({
|
|
|
95
95
|
/**
|
|
96
96
|
* Aggregated release row on `GET /v1/categories/:slug/releases`. Same wire
|
|
97
97
|
* shape as `CollectionReleaseItem` — both surfaces aggregate across orgs and
|
|
98
|
-
* use `formatAggregateReleaseRow` in `
|
|
98
|
+
* use `formatAggregateReleaseRow` in `apps/api/src/utils.ts` for the
|
|
99
99
|
* formatting. Re-exported here so the two endpoints describe one schema
|
|
100
100
|
* instead of two drifting copies.
|
|
101
101
|
*/
|