@buildinternet/releases-api-types 0.48.0 → 0.50.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.48.0",
3
+ "version": "0.50.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.28.0",
20
+ "@buildinternet/releases-core": "^0.29.0",
21
21
  "zod": "^4.4.3"
22
22
  },
23
23
  "publishConfig": {
package/src/api-types.ts CHANGED
@@ -825,6 +825,49 @@ export interface StuckSourcesResponse extends ListResponse<StuckSource> {
825
825
  };
826
826
  }
827
827
 
828
+ // ── Admin telemetry: provider / ingest health ──
829
+
830
+ /**
831
+ * A source flagged as "overdue for evaluation" — `sources.last_fetched_at`
832
+ * (written on every successful check, including `no_change`) is older than
833
+ * the health scan's threshold, or null. This is deliberately independent of
834
+ * release recency: a source can be perfectly healthy (actively checked, just
835
+ * quiet) while its latest release is months old, and conversely every source
836
+ * can look quiet-but-fine by release date while the thing that checks them —
837
+ * ingest, extraction, the AI provider — has silently stopped running. See the
838
+ * 2026-07-23 spend-cap outage (#2168): `last_fetched_at` froze across every
839
+ * affected source for six days while nothing else changed.
840
+ */
841
+ export interface ProviderHealthSource {
842
+ sourceId: string;
843
+ sourceSlug: string;
844
+ name: string;
845
+ type: SourceType;
846
+ orgSlug: string | null;
847
+ orgName: string | null;
848
+ fetchPriority: SourceFetchPriority;
849
+ isPrimary: boolean;
850
+ /** `sources.last_fetched_at` — null when the source has never been fetched successfully. */
851
+ lastFetchedAt: string | null;
852
+ /** Days since `lastFetchedAt` (or since the source was created, if never fetched). */
853
+ daysSinceFetched: number;
854
+ }
855
+
856
+ export interface ProviderHealthResponse extends ListResponse<ProviderHealthSource> {
857
+ meta: {
858
+ /** A source is "overdue" once its last successful check exceeds this many days. */
859
+ overdueThresholdDays: number;
860
+ /** Active (non-paused, non-deleted) sources considered by the scan. */
861
+ totalActiveSources: number;
862
+ /** Sources whose last successful check is older than the threshold, or never. */
863
+ overdueSources: number;
864
+ /** Distinct orgs with at least one overdue source. */
865
+ overdueOrgs: number;
866
+ /** Distinct orgs represented among active sources. */
867
+ totalOrgs: number;
868
+ };
869
+ }
870
+
828
871
  // ── Releases ──
829
872
 
830
873
  /**
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- import { ImportanceScoreSchema } from "./shared.js";
2
+ import { AppStoreSourceInfoSchema, ImportanceScoreSchema } from "./shared.js";
3
3
 
4
4
  /**
5
5
  * Anchor scope for related-* lookups. `org` filters the Vectorize query by
@@ -24,6 +24,15 @@ export const RelatedReleaseSourceSchema = z.object({
24
24
  orgSlug: z.string().nullable(),
25
25
  orgName: z.string().nullable(),
26
26
  orgAvatarUrl: z.string().nullable(),
27
+ /**
28
+ * App Store platform + icon, present only for `appstore` sources (resolved
29
+ * server-side, same block the org/product/ticker read paths already carry).
30
+ * Its presence is the signal the related rail uses to render the lean
31
+ * mobile-app card (app icon + "iOS/macOS" cue) instead of the standard
32
+ * headline/thumbnail. Additive/optional for mid-deploy pin tolerance.
33
+ * #mobile-app-release-cards
34
+ */
35
+ appStore: AppStoreSourceInfoSchema.optional(),
27
36
  });
28
37
 
29
38
  /**