@buildinternet/releases-api-types 0.49.0 → 0.51.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.49.0",
3
+ "version": "0.51.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.29.0",
20
+ "@buildinternet/releases-core": "^0.30.0",
21
21
  "zod": "^4.4.3"
22
22
  },
23
23
  "publishConfig": {
package/src/api-types.ts CHANGED
@@ -363,6 +363,7 @@ export {
363
363
  ListingPromoteLocatorOutcomeSchema,
364
364
  ListingPromoteLocatorSchema,
365
365
  ListingPromoteResultSchema,
366
+ ListingCapabilitiesSchema,
366
367
  type ListingValidateBody,
367
368
  type ListingActivateBody,
368
369
  type ListingIssue,
@@ -381,6 +382,7 @@ export {
381
382
  type ListingPromoteLocatorOutcome,
382
383
  type ListingPromoteLocator,
383
384
  type ListingPromoteResult,
385
+ type ListingCapabilities,
384
386
  } from "./schemas/listing.js";
385
387
  export {
386
388
  SourceListItemSchema,
@@ -641,7 +643,9 @@ export interface CreateUserApiKeyBody {
641
643
 
642
644
  export type SitemapSource = z.infer<typeof SitemapSourceSchema>;
643
645
  export type SitemapPayload = z.infer<typeof SitemapPayloadSchema>;
646
+ /** @deprecated The `GET /v1/sitemap/releases` endpoint was retired in #2219. */
644
647
  export type SitemapRelease = z.infer<typeof SitemapReleaseSchema>;
648
+ /** @deprecated The `GET /v1/sitemap/releases` endpoint was retired in #2219. */
645
649
  export type SitemapReleasesPayload = z.infer<typeof SitemapReleasesPayloadSchema>;
646
650
 
647
651
  // ── Related (Vectorize neighbors) ──
@@ -825,6 +829,49 @@ export interface StuckSourcesResponse extends ListResponse<StuckSource> {
825
829
  };
826
830
  }
827
831
 
832
+ // ── Admin telemetry: provider / ingest health ──
833
+
834
+ /**
835
+ * A source flagged as "overdue for evaluation" — `sources.last_fetched_at`
836
+ * (written on every successful check, including `no_change`) is older than
837
+ * the health scan's threshold, or null. This is deliberately independent of
838
+ * release recency: a source can be perfectly healthy (actively checked, just
839
+ * quiet) while its latest release is months old, and conversely every source
840
+ * can look quiet-but-fine by release date while the thing that checks them —
841
+ * ingest, extraction, the AI provider — has silently stopped running. See the
842
+ * 2026-07-23 spend-cap outage (#2168): `last_fetched_at` froze across every
843
+ * affected source for six days while nothing else changed.
844
+ */
845
+ export interface ProviderHealthSource {
846
+ sourceId: string;
847
+ sourceSlug: string;
848
+ name: string;
849
+ type: SourceType;
850
+ orgSlug: string | null;
851
+ orgName: string | null;
852
+ fetchPriority: SourceFetchPriority;
853
+ isPrimary: boolean;
854
+ /** `sources.last_fetched_at` — null when the source has never been fetched successfully. */
855
+ lastFetchedAt: string | null;
856
+ /** Days since `lastFetchedAt` (or since the source was created, if never fetched). */
857
+ daysSinceFetched: number;
858
+ }
859
+
860
+ export interface ProviderHealthResponse extends ListResponse<ProviderHealthSource> {
861
+ meta: {
862
+ /** A source is "overdue" once its last successful check exceeds this many days. */
863
+ overdueThresholdDays: number;
864
+ /** Active (non-paused, non-deleted) sources considered by the scan. */
865
+ totalActiveSources: number;
866
+ /** Sources whose last successful check is older than the threshold, or never. */
867
+ overdueSources: number;
868
+ /** Distinct orgs with at least one overdue source. */
869
+ overdueOrgs: number;
870
+ /** Distinct orgs represented among active sources. */
871
+ totalOrgs: number;
872
+ };
873
+ }
874
+
828
875
  // ── Releases ──
829
876
 
830
877
  /**
@@ -168,3 +168,16 @@ export const ListingPromoteResultSchema = z.strictObject({
168
168
  locators: z.array(ListingPromoteLocatorSchema),
169
169
  });
170
170
  export type ListingPromoteResult = z.infer<typeof ListingPromoteResultSchema>;
171
+
172
+ /**
173
+ * Public capability flags for the listing lane. Anonymous + always reachable
174
+ * (does NOT 404 when either kill switch is off) so the web UI can hide CTAs
175
+ * instead of offering a button that fails with "Not found".
176
+ */
177
+ export const ListingCapabilitiesSchema = z.strictObject({
178
+ /** `listing-self-serve-enabled` — validate / activate / claim / verify. */
179
+ selfServeEnabled: z.boolean(),
180
+ /** `listing-self-serve-promotion-enabled` — POST /v1/listing/promote. */
181
+ promotionEnabled: z.boolean(),
182
+ });
183
+ export type ListingCapabilities = z.infer<typeof ListingCapabilitiesSchema>;
@@ -57,9 +57,14 @@ export const SitemapPayloadSchema = z.object({
57
57
  });
58
58
 
59
59
  /**
60
- * Per-release row in `GET /v1/sitemap/releases` (#1181, scoped down). Carries
61
- * exactly what the web needs to build the slugged canonical `/release/...`
62
- * URL (`releasePath()` inputs) plus `fetchedAt` for `<lastmod>`.
60
+ * Per-release row previously returned by `GET /v1/sitemap/releases` (#1181,
61
+ * scoped down). Carries what the web needed to build the slugged canonical
62
+ * `/release/...` URL (`releasePath()` inputs) plus `fetchedAt` for `<lastmod>`.
63
+ *
64
+ * @deprecated The endpoint was retired in #2219 — its only consumer
65
+ * (`sitemap-releases.xml`) was removed in #2218 when release pages went
66
+ * `noindex`. Kept for one minor version per the deprecation lane; will be
67
+ * removed in a future minor.
63
68
  */
64
69
  export const SitemapReleaseSchema = z.object({
65
70
  id: z.string(),
@@ -72,8 +77,12 @@ export const SitemapReleaseSchema = z.object({
72
77
  });
73
78
 
74
79
  /**
75
- * Payload for the curated release sitemap: visible releases with a summary
76
- * and importance at or above the experiment threshold, newest first, capped.
80
+ * Payload previously returned by the curated release sitemap endpoint.
81
+ *
82
+ * @deprecated The endpoint was retired in #2219 — its only consumer
83
+ * (`sitemap-releases.xml`) was removed in #2218 when release pages went
84
+ * `noindex`. Kept for one minor version per the deprecation lane; will be
85
+ * removed in a future minor.
77
86
  */
78
87
  export const SitemapReleasesPayloadSchema = z.object({
79
88
  releases: z.array(SitemapReleaseSchema),