@buildinternet/releases-api-types 0.58.3 → 0.60.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 (125) hide show
  1. package/README.md +14 -6
  2. package/dist/api-types.d.ts +1168 -0
  3. package/dist/api-types.d.ts.map +1 -0
  4. package/dist/api-types.js +134 -0
  5. package/dist/schemas/account-profile.d.ts +29 -0
  6. package/dist/schemas/account-profile.d.ts.map +1 -0
  7. package/dist/schemas/account-profile.js +24 -0
  8. package/dist/schemas/ai-models.d.ts +67 -0
  9. package/dist/schemas/ai-models.d.ts.map +1 -0
  10. package/{src/schemas/ai-models.ts → dist/schemas/ai-models.js} +25 -31
  11. package/dist/schemas/api-keys.d.ts +71 -0
  12. package/dist/schemas/api-keys.d.ts.map +1 -0
  13. package/dist/schemas/api-keys.js +32 -0
  14. package/dist/schemas/classifications.d.ts +134 -0
  15. package/dist/schemas/classifications.d.ts.map +1 -0
  16. package/dist/schemas/classifications.js +96 -0
  17. package/dist/schemas/collections.d.ts +605 -0
  18. package/dist/schemas/collections.d.ts.map +1 -0
  19. package/dist/schemas/collections.js +320 -0
  20. package/dist/schemas/datasets.d.ts +34 -0
  21. package/dist/schemas/datasets.d.ts.map +1 -0
  22. package/dist/schemas/datasets.js +11 -0
  23. package/dist/schemas/errors.d.ts +43 -0
  24. package/dist/schemas/errors.d.ts.map +1 -0
  25. package/dist/schemas/errors.js +61 -0
  26. package/dist/schemas/feedback.d.ts +134 -0
  27. package/dist/schemas/feedback.d.ts.map +1 -0
  28. package/dist/schemas/feedback.js +76 -0
  29. package/dist/schemas/follows.d.ts +154 -0
  30. package/dist/schemas/follows.d.ts.map +1 -0
  31. package/dist/schemas/follows.js +42 -0
  32. package/dist/schemas/listing.d.ts +374 -0
  33. package/dist/schemas/listing.d.ts.map +1 -0
  34. package/dist/schemas/listing.js +175 -0
  35. package/dist/schemas/lookups.d.ts +285 -0
  36. package/dist/schemas/lookups.d.ts.map +1 -0
  37. package/{src/schemas/lookups.ts → dist/schemas/lookups.js} +67 -80
  38. package/dist/schemas/marketing-classifier.d.ts +32 -0
  39. package/dist/schemas/marketing-classifier.d.ts.map +1 -0
  40. package/{src/schemas/marketing-classifier.ts → dist/schemas/marketing-classifier.js} +14 -18
  41. package/dist/schemas/orgs.d.ts +950 -0
  42. package/dist/schemas/orgs.d.ts.map +1 -0
  43. package/dist/schemas/orgs.js +473 -0
  44. package/dist/schemas/overviews.d.ts +205 -0
  45. package/dist/schemas/overviews.d.ts.map +1 -0
  46. package/{src/schemas/overviews.ts → dist/schemas/overviews.js} +41 -54
  47. package/dist/schemas/products.d.ts +595 -0
  48. package/dist/schemas/products.d.ts.map +1 -0
  49. package/{src/schemas/products.ts → dist/schemas/products.js} +113 -136
  50. package/dist/schemas/publish-tokens.d.ts +55 -0
  51. package/dist/schemas/publish-tokens.d.ts.map +1 -0
  52. package/{src/schemas/publish-tokens.ts → dist/schemas/publish-tokens.js} +18 -29
  53. package/dist/schemas/recommendations.d.ts +52 -0
  54. package/dist/schemas/recommendations.d.ts.map +1 -0
  55. package/dist/schemas/recommendations.js +58 -0
  56. package/dist/schemas/related.d.ts +331 -0
  57. package/dist/schemas/related.d.ts.map +1 -0
  58. package/dist/schemas/related.js +115 -0
  59. package/dist/schemas/releases.d.ts +623 -0
  60. package/dist/schemas/releases.d.ts.map +1 -0
  61. package/dist/schemas/releases.js +414 -0
  62. package/dist/schemas/resolve.d.ts +259 -0
  63. package/dist/schemas/resolve.d.ts.map +1 -0
  64. package/{src/schemas/resolve.ts → dist/schemas/resolve.js} +2 -5
  65. package/dist/schemas/search.d.ts +475 -0
  66. package/dist/schemas/search.d.ts.map +1 -0
  67. package/dist/schemas/search.js +258 -0
  68. package/dist/schemas/semantic-alert-summary.d.ts +54 -0
  69. package/dist/schemas/semantic-alert-summary.d.ts.map +1 -0
  70. package/dist/schemas/semantic-alert-summary.js +57 -0
  71. package/dist/schemas/semantic-alerts.d.ts +41 -0
  72. package/dist/schemas/semantic-alerts.d.ts.map +1 -0
  73. package/dist/schemas/semantic-alerts.js +42 -0
  74. package/dist/schemas/shared.d.ts +247 -0
  75. package/dist/schemas/shared.d.ts.map +1 -0
  76. package/dist/schemas/shared.js +248 -0
  77. package/dist/schemas/site-notice.d.ts +35 -0
  78. package/dist/schemas/site-notice.d.ts.map +1 -0
  79. package/{src/schemas/site-notice.ts → dist/schemas/site-notice.js} +14 -18
  80. package/dist/schemas/sitemap.d.ts +97 -0
  81. package/dist/schemas/sitemap.d.ts.map +1 -0
  82. package/dist/schemas/sitemap.js +107 -0
  83. package/dist/schemas/sources.d.ts +1145 -0
  84. package/dist/schemas/sources.d.ts.map +1 -0
  85. package/dist/schemas/sources.js +645 -0
  86. package/dist/schemas/stats.d.ts +82 -0
  87. package/dist/schemas/stats.d.ts.map +1 -0
  88. package/dist/schemas/stats.js +59 -0
  89. package/dist/schemas/taxonomy.d.ts +344 -0
  90. package/dist/schemas/taxonomy.d.ts.map +1 -0
  91. package/{src/schemas/taxonomy.ts → dist/schemas/taxonomy.js} +47 -58
  92. package/dist/schemas/webhooks.d.ts +618 -0
  93. package/dist/schemas/webhooks.d.ts.map +1 -0
  94. package/dist/schemas/webhooks.js +191 -0
  95. package/dist/schemas/well-known.d.ts +302 -0
  96. package/dist/schemas/well-known.d.ts.map +1 -0
  97. package/dist/schemas/well-known.js +192 -0
  98. package/dist/schemas/workspace-integrations.d.ts +27 -0
  99. package/dist/schemas/workspace-integrations.d.ts.map +1 -0
  100. package/dist/schemas/workspace-integrations.js +22 -0
  101. package/package.json +16 -4
  102. package/src/api-types.ts +0 -2223
  103. package/src/schemas/account-profile.ts +0 -28
  104. package/src/schemas/ai-models.test.ts +0 -29
  105. package/src/schemas/classifications.ts +0 -109
  106. package/src/schemas/collections.ts +0 -346
  107. package/src/schemas/errors.test.ts +0 -55
  108. package/src/schemas/errors.ts +0 -81
  109. package/src/schemas/feedback.ts +0 -56
  110. package/src/schemas/listing.ts +0 -226
  111. package/src/schemas/orgs.ts +0 -533
  112. package/src/schemas/recommendations.ts +0 -39
  113. package/src/schemas/related.ts +0 -126
  114. package/src/schemas/releases.ts +0 -436
  115. package/src/schemas/search.ts +0 -274
  116. package/src/schemas/semantic-alert-summary.ts +0 -65
  117. package/src/schemas/shared.notice.test.ts +0 -36
  118. package/src/schemas/shared.ts +0 -267
  119. package/src/schemas/site-notice.test.ts +0 -67
  120. package/src/schemas/sitemap.ts +0 -114
  121. package/src/schemas/sources.ts +0 -674
  122. package/src/schemas/stats.ts +0 -62
  123. package/src/schemas/well-known.test.ts +0 -264
  124. package/src/schemas/well-known.ts +0 -252
  125. package/src/schemas/workspace-integrations.ts +0 -26
@@ -0,0 +1,97 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Per-source row in `GET /v1/sitemap`. `hasChangelog` and `hasHighlights`
4
+ * are `.optional()` for backwards compatibility — older clients ignore the
5
+ * fields, but the current handler always populates them (#875).
6
+ */
7
+ export declare const SitemapSourceSchema: z.ZodObject<{
8
+ id: z.ZodOptional<z.ZodString>;
9
+ dataset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
10
+ name: z.ZodString;
11
+ description: z.ZodString;
12
+ }, z.core.$strip>>>;
13
+ orgSlug: z.ZodString;
14
+ slug: z.ZodString;
15
+ latestDate: z.ZodNullable<z.ZodString>;
16
+ hasChangelog: z.ZodOptional<z.ZodBoolean>;
17
+ hasHighlights: z.ZodOptional<z.ZodBoolean>;
18
+ }, z.core.$strip>;
19
+ /**
20
+ * Bulk URL payload consumed by the web sitemap generator. Lists every
21
+ * orgs/sources/products/collections slug paired with the timestamp the web
22
+ * uses to drive `<lastmod>`. Soft-deleted / hidden / on_demand rows are
23
+ * excluded.
24
+ */
25
+ export declare const SitemapPayloadSchema: z.ZodObject<{
26
+ orgs: z.ZodArray<z.ZodObject<{
27
+ slug: z.ZodString;
28
+ lastActivity: z.ZodNullable<z.ZodString>;
29
+ releaseCount: z.ZodOptional<z.ZodNumber>;
30
+ hasOverview: z.ZodOptional<z.ZodBoolean>;
31
+ }, z.core.$strip>>;
32
+ sources: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodOptional<z.ZodString>;
34
+ dataset: z.ZodOptional<z.ZodNullable<z.ZodObject<{
35
+ name: z.ZodString;
36
+ description: z.ZodString;
37
+ }, z.core.$strip>>>;
38
+ orgSlug: z.ZodString;
39
+ slug: z.ZodString;
40
+ latestDate: z.ZodNullable<z.ZodString>;
41
+ hasChangelog: z.ZodOptional<z.ZodBoolean>;
42
+ hasHighlights: z.ZodOptional<z.ZodBoolean>;
43
+ }, z.core.$strip>>;
44
+ products: z.ZodArray<z.ZodObject<{
45
+ orgSlug: z.ZodString;
46
+ slug: z.ZodString;
47
+ releaseCount: z.ZodOptional<z.ZodNumber>;
48
+ }, z.core.$strip>>;
49
+ collections: z.ZodArray<z.ZodObject<{
50
+ slug: z.ZodString;
51
+ updatedAt: z.ZodString;
52
+ }, z.core.$strip>>;
53
+ digests: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ collectionSlug: z.ZodString;
55
+ weekStart: z.ZodString;
56
+ generatedAt: z.ZodString;
57
+ }, z.core.$strip>>>;
58
+ }, z.core.$strip>;
59
+ /**
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.
68
+ */
69
+ export declare const SitemapReleaseSchema: z.ZodObject<{
70
+ id: z.ZodString;
71
+ title: z.ZodString;
72
+ titleShort: z.ZodNullable<z.ZodString>;
73
+ titleGenerated: z.ZodNullable<z.ZodString>;
74
+ version: z.ZodNullable<z.ZodString>;
75
+ publishedAt: z.ZodNullable<z.ZodString>;
76
+ fetchedAt: z.ZodString;
77
+ }, z.core.$strip>;
78
+ /**
79
+ * Payload previously returned by the curated release sitemap endpoint.
80
+ *
81
+ * @deprecated The endpoint was retired in #2219 — its only consumer
82
+ * (`sitemap-releases.xml`) was removed in #2218 when release pages went
83
+ * `noindex`. Kept for one minor version per the deprecation lane; will be
84
+ * removed in a future minor.
85
+ */
86
+ export declare const SitemapReleasesPayloadSchema: z.ZodObject<{
87
+ releases: z.ZodArray<z.ZodObject<{
88
+ id: z.ZodString;
89
+ title: z.ZodString;
90
+ titleShort: z.ZodNullable<z.ZodString>;
91
+ titleGenerated: z.ZodNullable<z.ZodString>;
92
+ version: z.ZodNullable<z.ZodString>;
93
+ publishedAt: z.ZodNullable<z.ZodString>;
94
+ fetchedAt: z.ZodString;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ //# sourceMappingURL=sitemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sitemap.d.ts","sourceRoot":"","sources":["../../src/schemas/sitemap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;iBAuB9B,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6C/B,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;iBAQ/B,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;iBAEvC,CAAC"}
@@ -0,0 +1,107 @@
1
+ import { z } from "zod";
2
+ import { DatasetDescriptionSchema } from "./datasets.js";
3
+ /**
4
+ * Per-source row in `GET /v1/sitemap`. `hasChangelog` and `hasHighlights`
5
+ * are `.optional()` for backwards compatibility — older clients ignore the
6
+ * fields, but the current handler always populates them (#875).
7
+ */
8
+ export const SitemapSourceSchema = z.object({
9
+ /**
10
+ * Source id. `.optional()` for backwards compatibility — added #1190 so the
11
+ * web can route shadowed sources to `/sources/:id`; older/cached responses
12
+ * may omit it and the web degrades to the bare URL.
13
+ */
14
+ id: z.string().optional(),
15
+ /** Null explicitly disables; absence supports older API deploys. */
16
+ dataset: DatasetDescriptionSchema.nullable().optional(),
17
+ orgSlug: z.string(),
18
+ slug: z.string(),
19
+ latestDate: z.string().nullable(),
20
+ /**
21
+ * Whether this source has a stored GitHub CHANGELOG file. Used by the web
22
+ * sitemap to emit `/{org}/{src}/changelog` URLs only for sources where the
23
+ * route resolves.
24
+ */
25
+ hasChangelog: z.boolean().optional(),
26
+ /**
27
+ * Whether this source has any rolling or monthly highlight summaries.
28
+ * Drives `/{org}/{src}/highlights` sitemap emission.
29
+ */
30
+ hasHighlights: z.boolean().optional(),
31
+ });
32
+ /**
33
+ * Bulk URL payload consumed by the web sitemap generator. Lists every
34
+ * orgs/sources/products/collections slug paired with the timestamp the web
35
+ * uses to drive `<lastmod>`. Soft-deleted / hidden / on_demand rows are
36
+ * excluded.
37
+ */
38
+ export const SitemapPayloadSchema = z.object({
39
+ orgs: z.array(z.object({
40
+ slug: z.string(),
41
+ lastActivity: z.string().nullable(),
42
+ /**
43
+ * Total releases across the org's sources — the same count org detail
44
+ * reports as `releaseCount`. With `hasOverview`, drives the web's index
45
+ * bar for the org and its products/sources. `.optional()` for backwards
46
+ * compatibility with older cached responses.
47
+ */
48
+ releaseCount: z.number().int().optional(),
49
+ /** Whether the org has a generated overview page. */
50
+ hasOverview: z.boolean().optional(),
51
+ })),
52
+ sources: z.array(SitemapSourceSchema),
53
+ products: z.array(z.object({
54
+ orgSlug: z.string(),
55
+ slug: z.string(),
56
+ /**
57
+ * Visible releases across the product's visible sources — the same count
58
+ * org detail reports per product. Drives the web's product index bar.
59
+ * `.optional()` for backwards compatibility with older cached responses.
60
+ */
61
+ releaseCount: z.number().int().optional(),
62
+ })),
63
+ collections: z.array(z.object({ slug: z.string(), updatedAt: z.string() })),
64
+ /**
65
+ * Weekly collection digest permalinks (`/collections/:slug/digest/:week`),
66
+ * with `generatedAt` driving `<lastmod>`. `.optional()` for backwards
67
+ * compatibility with older cached responses. Small at 12 collections × 52
68
+ * weeks/year, so no dedicated `/sitemap/digests` surface (unlike releases).
69
+ */
70
+ digests: z
71
+ .array(z.object({
72
+ collectionSlug: z.string(),
73
+ weekStart: z.string(),
74
+ generatedAt: z.string(),
75
+ }))
76
+ .optional(),
77
+ });
78
+ /**
79
+ * Per-release row previously returned by `GET /v1/sitemap/releases` (#1181,
80
+ * scoped down). Carries what the web needed to build the slugged canonical
81
+ * `/release/...` URL (`releasePath()` inputs) plus `fetchedAt` for `<lastmod>`.
82
+ *
83
+ * @deprecated The endpoint was retired in #2219 — its only consumer
84
+ * (`sitemap-releases.xml`) was removed in #2218 when release pages went
85
+ * `noindex`. Kept for one minor version per the deprecation lane; will be
86
+ * removed in a future minor.
87
+ */
88
+ export const SitemapReleaseSchema = z.object({
89
+ id: z.string(),
90
+ title: z.string(),
91
+ titleShort: z.string().nullable(),
92
+ titleGenerated: z.string().nullable(),
93
+ version: z.string().nullable(),
94
+ publishedAt: z.string().nullable(),
95
+ fetchedAt: z.string(),
96
+ });
97
+ /**
98
+ * Payload previously returned by the curated release sitemap endpoint.
99
+ *
100
+ * @deprecated The endpoint was retired in #2219 — its only consumer
101
+ * (`sitemap-releases.xml`) was removed in #2218 when release pages went
102
+ * `noindex`. Kept for one minor version per the deprecation lane; will be
103
+ * removed in a future minor.
104
+ */
105
+ export const SitemapReleasesPayloadSchema = z.object({
106
+ releases: z.array(SitemapReleaseSchema),
107
+ });