@buildinternet/releases-api-types 0.6.0 → 0.7.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api-types.ts +48 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buildinternet/releases-api-types",
3
- "version": "0.6.0",
3
+ "version": "0.7.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",
package/src/api-types.ts CHANGED
@@ -264,13 +264,40 @@ export interface SourceDetail {
264
264
  lastPolledAt: string | null;
265
265
  trackingSince: string;
266
266
  releases: ReleaseItem[];
267
- pagination: { page: number; pageSize: number; totalPages: number; totalItems: number };
267
+ pagination: Pagination;
268
268
  summaries: {
269
269
  rolling: ReleaseSummaryItem | null;
270
270
  monthly: ReleaseSummaryItem[];
271
271
  };
272
272
  }
273
273
 
274
+ // ── Admin telemetry: orgs rollup ──
275
+
276
+ export interface OrgsRollupRow {
277
+ /** Org slug, or "—" for sources without an org. */
278
+ orgSlug: string;
279
+ sourceCount: number;
280
+ /** Sources with no release on file or `latestDate` older than `staleDays`. */
281
+ staleCount: number;
282
+ /** Most-recent release across all of the org's sources, or null. */
283
+ mostRecentRelease: string | null;
284
+ mostRecentAgeDays: number | null;
285
+ /** True iff every source in the org is stale (and the org has at least one source). */
286
+ allStale: boolean;
287
+ }
288
+
289
+ export interface OrgsRollupResponse extends ListResponse<OrgsRollupRow> {
290
+ meta: {
291
+ /** Stale cutoff used server-side, in days. */
292
+ staleDays: number;
293
+ totalOrgs: number;
294
+ /** Orgs where every source is stale. */
295
+ dormantOrgs: number;
296
+ /** Orgs with at least one stale source. */
297
+ anyStaleOrgs: number;
298
+ };
299
+ }
300
+
274
301
  // ── Releases ──
275
302
 
276
303
  /**
@@ -939,3 +966,23 @@ export interface EmbedStatusResponse {
939
966
  };
940
967
  chunks: { total: number; embedded: number; unembedded: number };
941
968
  }
969
+
970
+ // ── Evaluate (URL recommendation) ──
971
+
972
+ /**
973
+ * Returned verbatim by GET /v1/evaluate. Lives in the public api-types package
974
+ * so external consumers (CLI, third-party clients) can import the shape
975
+ * without depending on worker-internal AI helpers.
976
+ */
977
+ export interface EvaluationResult {
978
+ recommendedMethod: "feed" | "github" | "markdown" | "scrape" | "crawl";
979
+ recommendedUrl: string;
980
+ feedUrl?: string;
981
+ feedType?: "rss" | "atom" | "jsonfeed";
982
+ githubRepo?: string;
983
+ pageStructure: "single-page" | "index" | "unknown";
984
+ alternatives: Array<{ url: string; method: string; note: string }>;
985
+ confidence: "high" | "medium" | "low";
986
+ provider?: string;
987
+ notes?: string;
988
+ }