@buildinternet/releases-api-types 0.58.1 → 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 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](https://github.com/buildinternet/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,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildinternet/releases-api-types",
3
- "version": "0.58.1",
3
+ "version": "0.58.2",
4
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",
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. */
@@ -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
  /**