@buildinternet/releases-api-types 0.11.0 → 0.13.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildinternet/releases-api-types",
3
- "version": "0.11.0",
3
+ "version": "0.13.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",
package/src/api-types.ts CHANGED
@@ -208,7 +208,23 @@ export interface ReleaseDetail {
208
208
  version: string | null;
209
209
  title: string;
210
210
  content: string;
211
+ /** AI-generated summary (#852, renamed in #860). Nullable — most rows unpopulated. */
212
+ summary: string | null;
213
+ /**
214
+ * AI-generated self-contained news-headline form of the release (#852,
215
+ * renamed in #860). Nullable because most rows are unpopulated — fall
216
+ * back to `title` for display. `.optional()` for the same mid-deploy /
217
+ * pinned-worker reason as `type` on {@link ReleaseItem}.
218
+ */
219
+ titleGenerated?: string | null;
220
+ /** AI-generated smart-brevity headline (#852, renamed in #860). Same fallback as `titleGenerated`. */
221
+ titleShort?: string | null;
222
+ /** @deprecated Use `summary`. Kept as an alias populated with the same value. */
211
223
  contentSummary: string | null;
224
+ /** @deprecated Use `titleGenerated`. Kept as an alias populated with the same value. */
225
+ contentTitle?: string | null;
226
+ /** @deprecated Use `titleShort`. Kept as an alias populated with the same value. */
227
+ contentTitleShort?: string | null;
212
228
  url: string | null;
213
229
  media: MediaItem[];
214
230
  publishedAt: string | null;
@@ -334,6 +350,16 @@ export interface SearchReleaseHit {
334
350
  version: string | null;
335
351
  title: string;
336
352
  summary: string;
353
+ /** AI-generated headline (#852, renamed in #860). Optional + nullable: most rows are unpopulated. */
354
+ titleGenerated?: string | null;
355
+ /** AI-generated smart-brevity headline (#852, renamed in #860). Same caveat as titleGenerated. */
356
+ titleShort?: string | null;
357
+ /** @deprecated Use `titleGenerated`. Kept as an alias populated with the same value. */
358
+ contentTitle?: string | null;
359
+ /** @deprecated Use `titleShort`. Kept as an alias populated with the same value. */
360
+ contentTitleShort?: string | null;
361
+ /** @deprecated Use `summary`. Kept as an alias populated with the same value. */
362
+ contentSummary?: string;
337
363
  /**
338
364
  * Full release body, media URLs hydrated through the MEDIA_ORIGIN proxy.
339
365
  * Present so the web can render the same markdown + thumbnail treatment
@@ -785,7 +811,18 @@ export interface ReleaseWithSource {
785
811
  version: string | null;
786
812
  title: string;
787
813
  content: string;
814
+ /** AI-generated summary (#852, renamed in #860). Nullable — most rows unpopulated. */
815
+ summary: string | null;
816
+ /** AI-generated headline (#852, renamed in #860). See {@link ReleaseDetail.titleGenerated}. */
817
+ titleGenerated?: string | null;
818
+ /** AI-generated smart-brevity headline (#852, renamed in #860). */
819
+ titleShort?: string | null;
820
+ /** @deprecated Use `summary`. Kept as an alias populated with the same value. */
788
821
  contentSummary: string | null;
822
+ /** @deprecated Use `titleGenerated`. Kept as an alias populated with the same value. */
823
+ contentTitle?: string | null;
824
+ /** @deprecated Use `titleShort`. Kept as an alias populated with the same value. */
825
+ contentTitleShort?: string | null;
789
826
  url: string | null;
790
827
  contentHash: string | null;
791
828
  metadata: string | null;
@@ -804,7 +841,18 @@ export interface LatestRelease {
804
841
  publishedAt: string | null;
805
842
  sourceName: string;
806
843
  sourceSlug: string;
844
+ /** AI-generated summary (#852, renamed in #860). Nullable — most rows unpopulated. */
845
+ summary: string | null;
846
+ /** AI-generated headline (#852, renamed in #860). See {@link ReleaseDetail.titleGenerated}. */
847
+ titleGenerated?: string | null;
848
+ /** AI-generated smart-brevity headline (#852, renamed in #860). */
849
+ titleShort?: string | null;
850
+ /** @deprecated Use `summary`. Kept as an alias populated with the same value. */
807
851
  contentSummary: string | null;
852
+ /** @deprecated Use `titleGenerated`. Kept as an alias populated with the same value. */
853
+ contentTitle?: string | null;
854
+ /** @deprecated Use `titleShort`. Kept as an alias populated with the same value. */
855
+ contentTitleShort?: string | null;
808
856
  media: MediaItem[];
809
857
  }
810
858
 
@@ -57,6 +57,18 @@ export const ReleaseItemSchema = z.object({
57
57
  // fall back to a SemVer-prerelease regex. `.optional()` for the same
58
58
  // older-response degrade-gracefully reason as `type`.
59
59
  prerelease: z.boolean().optional(),
60
+ // AI-generated headline forms paired with `summary` (#852, renamed in #860).
61
+ // Both nullable — most rows in the DB have neither populated, and we don't
62
+ // plan to backfill, so consumers must fall back to `title` for display.
63
+ // `.optional()` for the same mid-deploy / pinned-worker reason as `type`.
64
+ titleGenerated: z.string().nullable().optional(),
65
+ titleShort: z.string().nullable().optional(),
66
+ /** @deprecated Use `titleGenerated`. Kept as an alias populated with the same value. */
67
+ contentTitle: z.string().nullable().optional(),
68
+ /** @deprecated Use `titleShort`. Kept as an alias populated with the same value. */
69
+ contentTitleShort: z.string().nullable().optional(),
70
+ /** @deprecated Use `summary`. Kept as an alias populated with the same value. */
71
+ contentSummary: z.string().nullable().optional(),
60
72
  });
61
73
 
62
74
  export const ReleaseSummaryItemSchema = z.object({