@buildinternet/releases-api-types 0.3.0 → 0.4.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 +62 -0
package/package.json
CHANGED
package/src/api-types.ts
CHANGED
|
@@ -92,6 +92,12 @@ export interface SourceListItem {
|
|
|
92
92
|
latestAddedAt?: string | null;
|
|
93
93
|
isPrimary?: boolean;
|
|
94
94
|
isHidden?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* How the row was created. Optional on the wire so older API responses
|
|
97
|
+
* (mid-deploy or pinned old workers) degrade gracefully — consumers that
|
|
98
|
+
* see `undefined` should treat it as `"curated"`.
|
|
99
|
+
*/
|
|
100
|
+
discovery?: "curated" | "agent" | "on_demand";
|
|
95
101
|
fetchPriority?: "normal" | "low" | "paused" | null;
|
|
96
102
|
lastFetchedAt?: string | null;
|
|
97
103
|
lastPolledAt?: string | null;
|
|
@@ -123,6 +129,7 @@ export interface SourceWithOrg {
|
|
|
123
129
|
productSlug: string | null;
|
|
124
130
|
isPrimary: boolean;
|
|
125
131
|
isHidden: boolean | null;
|
|
132
|
+
discovery?: "curated" | "agent" | "on_demand";
|
|
126
133
|
metadata: string | null;
|
|
127
134
|
releaseCount: number;
|
|
128
135
|
latestVersion: string | null;
|
|
@@ -207,6 +214,18 @@ export interface SourceDetail {
|
|
|
207
214
|
name: string;
|
|
208
215
|
type: string;
|
|
209
216
|
url: string;
|
|
217
|
+
/**
|
|
218
|
+
* Hidden sources are reachable by direct URL but excluded from listings,
|
|
219
|
+
* sitemap, and AI features. Set on on-demand lookups and admin-suppressed
|
|
220
|
+
* rows; absent on canonical curated/agent sources.
|
|
221
|
+
*/
|
|
222
|
+
isHidden?: boolean;
|
|
223
|
+
/**
|
|
224
|
+
* Pairs with `isHidden` to distinguish admin-suppressed rows (`curated` /
|
|
225
|
+
* `agent` + hidden) from rows materialized by `/v1/lookups` (`on_demand`).
|
|
226
|
+
* Optional for graceful degradation against older API responses.
|
|
227
|
+
*/
|
|
228
|
+
discovery?: "curated" | "agent" | "on_demand";
|
|
210
229
|
changelogUrl?: string | null;
|
|
211
230
|
hasChangelogFile?: boolean;
|
|
212
231
|
org: { slug: string; name: string } | null;
|
|
@@ -228,6 +247,13 @@ export interface SourceDetail {
|
|
|
228
247
|
|
|
229
248
|
// ── Releases ──
|
|
230
249
|
|
|
250
|
+
/**
|
|
251
|
+
* Release type — mirrors `RELEASE_TYPES` in `@buildinternet/releases-core/schema`.
|
|
252
|
+
* Optional on the wire so older API responses (mid-deploy or pinned old workers)
|
|
253
|
+
* degrade gracefully — consumers that see `undefined` should treat it as `"feature"`.
|
|
254
|
+
*/
|
|
255
|
+
export type ReleaseType = "feature" | "rollup";
|
|
256
|
+
|
|
231
257
|
export interface ReleaseItem {
|
|
232
258
|
id?: string;
|
|
233
259
|
version: string | null;
|
|
@@ -237,6 +263,8 @@ export interface ReleaseItem {
|
|
|
237
263
|
publishedAt: string | null;
|
|
238
264
|
url: string | null;
|
|
239
265
|
media?: MediaItem[];
|
|
266
|
+
/** Release type. See {@link ReleaseType}. */
|
|
267
|
+
type?: ReleaseType;
|
|
240
268
|
}
|
|
241
269
|
|
|
242
270
|
export interface ReleaseDetail {
|
|
@@ -254,6 +282,8 @@ export interface ReleaseDetail {
|
|
|
254
282
|
sourceSlug: string;
|
|
255
283
|
sourceType: string;
|
|
256
284
|
org: { slug: string; name: string } | null;
|
|
285
|
+
/** Release type. See {@link ReleaseType}. */
|
|
286
|
+
type?: ReleaseType;
|
|
257
287
|
}
|
|
258
288
|
|
|
259
289
|
export interface ReleaseCoverageRow {
|
|
@@ -391,6 +421,8 @@ export interface SearchReleaseHit {
|
|
|
391
421
|
* use this to interleave release and chunk hits into a single ranked list.
|
|
392
422
|
*/
|
|
393
423
|
score?: number;
|
|
424
|
+
/** Release type. See {@link ReleaseType}. */
|
|
425
|
+
type?: ReleaseType;
|
|
394
426
|
}
|
|
395
427
|
|
|
396
428
|
/**
|
|
@@ -602,6 +634,36 @@ export interface ProductAdoptResult {
|
|
|
602
634
|
sourceOrgDeleted: string;
|
|
603
635
|
}
|
|
604
636
|
|
|
637
|
+
// ── Taxonomy (categories + tags) ──
|
|
638
|
+
|
|
639
|
+
export interface TaxonomyOrg {
|
|
640
|
+
slug: string;
|
|
641
|
+
name: string;
|
|
642
|
+
domain: string | null;
|
|
643
|
+
avatarUrl: string | null;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
export interface TaxonomyProduct {
|
|
647
|
+
slug: string;
|
|
648
|
+
name: string;
|
|
649
|
+
description: string | null;
|
|
650
|
+
orgSlug: string;
|
|
651
|
+
orgName: string;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
export interface CategoryDetail {
|
|
655
|
+
slug: string;
|
|
656
|
+
orgs: TaxonomyOrg[];
|
|
657
|
+
products: TaxonomyProduct[];
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
export interface TagDetail {
|
|
661
|
+
slug: string;
|
|
662
|
+
name: string;
|
|
663
|
+
orgs: TaxonomyOrg[];
|
|
664
|
+
products: TaxonomyProduct[];
|
|
665
|
+
}
|
|
666
|
+
|
|
605
667
|
// ── Releases (enriched) ──
|
|
606
668
|
|
|
607
669
|
/** Flat release shape returned by GET /v1/releases/:id with source metadata. */
|