@buildinternet/releases-api-types 0.58.0 → 0.58.2
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 +1 -1
- package/package.json +2 -2
- package/src/api-types.ts +21 -2
- package/src/schemas/collections.ts +17 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Wire protocol types for the [Releases](https://releases.sh) registry API.
|
|
|
6
6
|
|
|
7
7
|
Pure TypeScript types — zero runtime dependencies — describing request/response
|
|
8
8
|
shapes for the public HTTP API served at `api.releases.sh`. Consumed by the web
|
|
9
|
-
frontend, the remote MCP server, and the [Releases CLI](
|
|
9
|
+
frontend, the remote MCP server, and the [Releases CLI](../../apps/cli).
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildinternet/releases-api-types",
|
|
3
|
-
"version": "0.58.
|
|
4
|
-
"description": "Wire protocol — request/response types for the Releases
|
|
3
|
+
"version": "0.58.2",
|
|
4
|
+
"description": "Wire protocol — request/response types for the Releases Index API. Shared by web, workers, and clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
package/src/api-types.ts
CHANGED
|
@@ -1359,6 +1359,25 @@ export interface DigestPrefsRequest {
|
|
|
1359
1359
|
cadence: DigestCadence;
|
|
1360
1360
|
}
|
|
1361
1361
|
|
|
1362
|
+
/** One collection whose weekly digest the caller gets by email (#2459). */
|
|
1363
|
+
export interface CollectionDigestSubscription {
|
|
1364
|
+
collectionSlug: string;
|
|
1365
|
+
collectionName: string;
|
|
1366
|
+
/** ISO-8601. */
|
|
1367
|
+
createdAt: string;
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1370
|
+
/** GET /v1/me/collection-digests response, newest first. */
|
|
1371
|
+
export interface CollectionDigestSubscriptionsResponse {
|
|
1372
|
+
subscriptions: CollectionDigestSubscription[];
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
/** PUT / DELETE /v1/me/collection-digests/:slug response. Both are idempotent. */
|
|
1376
|
+
export interface CollectionDigestSubscriptionResponse {
|
|
1377
|
+
collectionSlug: string;
|
|
1378
|
+
subscribed: boolean;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1362
1381
|
// ── Semantic alerts (#2304 Phase 1) ──
|
|
1363
1382
|
|
|
1364
1383
|
/** Hard cap on saved semantic alerts per account. Enforced on create. */
|
|
@@ -2018,8 +2037,8 @@ export interface Session {
|
|
|
2018
2037
|
* it must never be reported as `"haiku"`. Surfaces on the detail GET.
|
|
2019
2038
|
*
|
|
2020
2039
|
* This is a logical role label, not the runtime model identifier. The
|
|
2021
|
-
* resolved Anthropic model string (e.g. `claude-sonnet-5`,
|
|
2022
|
-
* `claude-haiku-
|
|
2040
|
+
* resolved Anthropic model string (e.g. `claude-sonnet-5-5`,
|
|
2041
|
+
* `claude-haiku-5-5`) lives on `usage.model` when the session reported
|
|
2023
2042
|
* one — consult that field for the concrete model.
|
|
2024
2043
|
*/
|
|
2025
2044
|
agent?: "sonnet" | "haiku" | "coordinator" | "deterministic";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { ImportanceScoreSchema, ReleaseItemSchema } from "./shared.js";
|
|
2
|
+
import { ImportanceScoreSchema, ReleaseCompositionSchema, ReleaseItemSchema } from "./shared.js";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* One org as it appears inside a collection's preview list or detail page.
|
|
@@ -87,6 +87,8 @@ export const CollectionDetailSchema = z.object({
|
|
|
87
87
|
isFeatured: z.boolean(),
|
|
88
88
|
/** Per-collection enable toggle for the nightly daily-summary generation. */
|
|
89
89
|
dailySummaryEnabled: z.boolean(),
|
|
90
|
+
/** Whether the collection generates weekly digests (gates the email-subscribe toggle). */
|
|
91
|
+
weeklyDigestEnabled: z.boolean(),
|
|
90
92
|
members: z.array(CollectionMemberSchema),
|
|
91
93
|
/** @deprecated Use `members`. Org-only subset, kept for back-compat. */
|
|
92
94
|
orgs: z.array(CollectionMemberOrgSchema),
|
|
@@ -169,6 +171,8 @@ export const UpdateCollectionRequestSchema = z.object({
|
|
|
169
171
|
isFeatured: z.boolean().optional(),
|
|
170
172
|
/** Enable or disable the nightly daily-summary generation for this collection. */
|
|
171
173
|
dailySummaryEnabled: z.boolean().optional(),
|
|
174
|
+
/** Enable or disable the nightly weekly-digest generation for this collection (on by default for new collections). */
|
|
175
|
+
weeklyDigestEnabled: z.boolean().optional(),
|
|
172
176
|
});
|
|
173
177
|
|
|
174
178
|
/**
|
|
@@ -291,6 +295,18 @@ export const DigestCoveredReleaseSchema = z.object({
|
|
|
291
295
|
* marker on the collapsed "Releases covered" list.
|
|
292
296
|
*/
|
|
293
297
|
importance: ImportanceScoreSchema,
|
|
298
|
+
/**
|
|
299
|
+
* Per-category item counts from the AI release-content pass. Null when the
|
|
300
|
+
* row hasn't been summarized; optional for older servers. Powers the
|
|
301
|
+
* digest page's week-at-a-glance treemap.
|
|
302
|
+
*/
|
|
303
|
+
composition: ReleaseCompositionSchema.nullable().optional(),
|
|
304
|
+
/**
|
|
305
|
+
* ISO publish timestamp, as stored. Null when the source gave none;
|
|
306
|
+
* optional for older servers. A date-only source is stored at exactly
|
|
307
|
+
* `T00:00:00.000Z`. Powers the digest week replay's day placement.
|
|
308
|
+
*/
|
|
309
|
+
publishedAt: z.string().nullable().optional(),
|
|
294
310
|
});
|
|
295
311
|
|
|
296
312
|
/** One `###` section of a digest body, parsed server-side. */
|