@buildinternet/releases-api-types 0.11.0 → 0.12.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 +1 -1
- package/src/api-types.ts +21 -0
- package/src/schemas/shared.ts +6 -0
package/package.json
CHANGED
package/src/api-types.ts
CHANGED
|
@@ -209,6 +209,15 @@ export interface ReleaseDetail {
|
|
|
209
209
|
title: string;
|
|
210
210
|
content: string;
|
|
211
211
|
contentSummary: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* AI-generated self-contained news-headline form of the release (#852).
|
|
214
|
+
* Nullable because most rows are unpopulated — fall back to `title` for
|
|
215
|
+
* display. `.optional()` for the same mid-deploy / pinned-worker reason
|
|
216
|
+
* as `type` on {@link ReleaseItem}.
|
|
217
|
+
*/
|
|
218
|
+
contentTitle?: string | null;
|
|
219
|
+
/** AI-generated smart-brevity headline (#852). Same fallback as `contentTitle`. */
|
|
220
|
+
contentTitleShort?: string | null;
|
|
212
221
|
url: string | null;
|
|
213
222
|
media: MediaItem[];
|
|
214
223
|
publishedAt: string | null;
|
|
@@ -334,6 +343,10 @@ export interface SearchReleaseHit {
|
|
|
334
343
|
version: string | null;
|
|
335
344
|
title: string;
|
|
336
345
|
summary: string;
|
|
346
|
+
/** AI-generated headline (#852). Optional + nullable: most rows are unpopulated. */
|
|
347
|
+
contentTitle?: string | null;
|
|
348
|
+
/** AI-generated smart-brevity headline (#852). Same caveat as contentTitle. */
|
|
349
|
+
contentTitleShort?: string | null;
|
|
337
350
|
/**
|
|
338
351
|
* Full release body, media URLs hydrated through the MEDIA_ORIGIN proxy.
|
|
339
352
|
* Present so the web can render the same markdown + thumbnail treatment
|
|
@@ -786,6 +799,10 @@ export interface ReleaseWithSource {
|
|
|
786
799
|
title: string;
|
|
787
800
|
content: string;
|
|
788
801
|
contentSummary: string | null;
|
|
802
|
+
/** AI-generated headline (#852). See {@link ReleaseDetail.contentTitle}. */
|
|
803
|
+
contentTitle?: string | null;
|
|
804
|
+
/** AI-generated smart-brevity headline (#852). */
|
|
805
|
+
contentTitleShort?: string | null;
|
|
789
806
|
url: string | null;
|
|
790
807
|
contentHash: string | null;
|
|
791
808
|
metadata: string | null;
|
|
@@ -805,6 +822,10 @@ export interface LatestRelease {
|
|
|
805
822
|
sourceName: string;
|
|
806
823
|
sourceSlug: string;
|
|
807
824
|
contentSummary: string | null;
|
|
825
|
+
/** AI-generated headline (#852). See {@link ReleaseDetail.contentTitle}. */
|
|
826
|
+
contentTitle?: string | null;
|
|
827
|
+
/** AI-generated smart-brevity headline (#852). */
|
|
828
|
+
contentTitleShort?: string | null;
|
|
808
829
|
media: MediaItem[];
|
|
809
830
|
}
|
|
810
831
|
|
package/src/schemas/shared.ts
CHANGED
|
@@ -57,6 +57,12 @@ 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). Both nullable —
|
|
61
|
+
// most rows in the DB have neither populated, and we don't plan to backfill,
|
|
62
|
+
// so consumers must fall back to `title` for display. `.optional()` for the
|
|
63
|
+
// same mid-deploy / pinned-worker reason as `type`.
|
|
64
|
+
contentTitle: z.string().nullable().optional(),
|
|
65
|
+
contentTitleShort: z.string().nullable().optional(),
|
|
60
66
|
});
|
|
61
67
|
|
|
62
68
|
export const ReleaseSummaryItemSchema = z.object({
|