@buildinternet/releases-api-types 0.10.0 → 0.11.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.10.0",
3
+ "version": "0.11.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.18.0",
20
+ "@buildinternet/releases-core": "^0.19.0",
21
21
  "zod": "^4.3.6"
22
22
  },
23
23
  "publishConfig": {
package/src/api-types.ts CHANGED
@@ -19,6 +19,7 @@ import type {
19
19
  ReleaseItemSchema,
20
20
  ReleaseSummaryItemSchema,
21
21
  OverviewPageItemSchema,
22
+ OverviewCitationSchema,
22
23
  } from "./schemas/shared.js";
23
24
  import type {
24
25
  OrgListItemSchema,
@@ -68,6 +69,7 @@ export {
68
69
  ReleaseItemSchema,
69
70
  ReleaseSummaryItemSchema,
70
71
  OverviewPageItemSchema,
72
+ OverviewCitationSchema,
71
73
  CategorySchema,
72
74
  } from "./schemas/shared.js";
73
75
  export {
@@ -492,6 +494,7 @@ export interface UnifiedSearchResponse {
492
494
  // ── Overview Pages ──
493
495
 
494
496
  export type OverviewPageItem = z.infer<typeof OverviewPageItemSchema>;
497
+ export type OverviewCitation = z.infer<typeof OverviewCitationSchema>;
495
498
 
496
499
  /** @deprecated Use OverviewPageItem */
497
500
  export type KnowledgePageItem = OverviewPageItem;
@@ -685,15 +688,19 @@ export interface CollectionMemberOrg {
685
688
  name: string;
686
689
  domain: string | null;
687
690
  avatarUrl: string | null;
691
+ /** GitHub handle from org_accounts; lets the avatar fall back to github.com/<handle>.png. */
692
+ githubHandle: string | null;
688
693
  description: string | null;
689
694
  }
690
695
 
691
- /** Item shape on GET /v1/collections (list). */
696
+ /** Item shape on GET /v1/collections (list) and GET /v1/orgs/:slug/collections. */
692
697
  export interface CollectionListItem {
693
698
  slug: string;
694
699
  name: string;
695
700
  description: string | null;
696
701
  memberCount: number;
702
+ /** First few members for inline preview on the list page (capped at 3). */
703
+ previewMembers?: CollectionMemberOrg[];
697
704
  }
698
705
 
699
706
  /** Detail shape on GET /v1/collections/:slug. */
@@ -712,6 +719,15 @@ export interface CollectionDetail {
712
719
  */
713
720
  export interface CollectionReleaseItem extends OrgReleaseItem {
714
721
  org: { slug: string; name: string };
722
+ /**
723
+ * Product the release belongs to, if the source is bound to one. Powers
724
+ * the timeline's same-product rollup ("3 earlier Claude Code releases
725
+ * today") on the collections view. `null` for orgs without products or
726
+ * standalone sources. Optional on the wire so older workers mid-rollout
727
+ * (and hand-constructed test fixtures) don't trip the typecheck — clients
728
+ * should treat missing and `null` identically.
729
+ */
730
+ product?: { slug: string; name: string } | null;
715
731
  }
716
732
 
717
733
  export interface CollectionReleasesResponse {
@@ -68,6 +68,22 @@ export const ReleaseSummaryItemSchema = z.object({
68
68
  generatedAt: z.string(),
69
69
  });
70
70
 
71
+ /**
72
+ * Inline citation attached to an overview page (#846). Each row maps a
73
+ * character span in `OverviewPageItem.content` back to a release URL the
74
+ * model cited via Anthropic's search_result blocks. Optional everywhere it
75
+ * appears — pages generated before #846 lands have none, and consumers
76
+ * should degrade gracefully.
77
+ */
78
+ export const OverviewCitationSchema = z.object({
79
+ startIndex: z.number().int().min(0),
80
+ endIndex: z.number().int().min(0),
81
+ sourceUrl: z.string(),
82
+ title: z.string().nullable().optional(),
83
+ citedText: z.string(),
84
+ releaseId: z.string().nullable().optional(),
85
+ });
86
+
71
87
  export const OverviewPageItemSchema = z.object({
72
88
  scope: z.enum(["org", "product"]),
73
89
  orgSlug: z.string().nullable().optional(),
@@ -77,4 +93,5 @@ export const OverviewPageItemSchema = z.object({
77
93
  lastContributingReleaseAt: z.string().nullable(),
78
94
  generatedAt: z.string(),
79
95
  updatedAt: z.string(),
96
+ citations: z.array(OverviewCitationSchema).optional(),
80
97
  });