@buildinternet/releases-api-types 0.3.0 → 0.5.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 +82 -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. */
|
|
@@ -747,6 +809,26 @@ export interface EmbedBackfillResponse {
|
|
|
747
809
|
dryRun?: boolean;
|
|
748
810
|
}
|
|
749
811
|
|
|
812
|
+
/**
|
|
813
|
+
* Cascade-scope preview returned by `GET /v1/admin/orgs/:slug/dependents`.
|
|
814
|
+
* Backs the confirmation prompt in CLI/web before a hard-delete on an org —
|
|
815
|
+
* post-#690 Phase C, hard-deleting an org cascades into every source row
|
|
816
|
+
* tied to it and every per-source dependent table listed below.
|
|
817
|
+
*/
|
|
818
|
+
export interface OrgDependentsResponse {
|
|
819
|
+
org: { id: string; slug: string; name: string };
|
|
820
|
+
counts: {
|
|
821
|
+
sources: number;
|
|
822
|
+
releases: number;
|
|
823
|
+
fetchLog: number;
|
|
824
|
+
sourceChangelogFiles: number;
|
|
825
|
+
sourceChangelogChunks: number;
|
|
826
|
+
releaseSummaries: number;
|
|
827
|
+
mediaAssets: number;
|
|
828
|
+
webhookSubscriptions: number;
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
|
|
750
832
|
export interface EmbedStatusResponse {
|
|
751
833
|
releases: { total: number; embedded: number; unembedded: number };
|
|
752
834
|
entities: {
|