@buildinternet/releases-api-types 0.59.0 → 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 (126) 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 -5
  102. package/src/api-types.ts +0 -2229
  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/datasets.ts +0 -31
  108. package/src/schemas/errors.test.ts +0 -55
  109. package/src/schemas/errors.ts +0 -81
  110. package/src/schemas/feedback.ts +0 -56
  111. package/src/schemas/listing.ts +0 -226
  112. package/src/schemas/orgs.ts +0 -533
  113. package/src/schemas/recommendations.ts +0 -39
  114. package/src/schemas/related.ts +0 -126
  115. package/src/schemas/releases.ts +0 -449
  116. package/src/schemas/search.ts +0 -274
  117. package/src/schemas/semantic-alert-summary.ts +0 -65
  118. package/src/schemas/shared.notice.test.ts +0 -36
  119. package/src/schemas/shared.ts +0 -267
  120. package/src/schemas/site-notice.test.ts +0 -67
  121. package/src/schemas/sitemap.ts +0 -117
  122. package/src/schemas/sources.ts +0 -674
  123. package/src/schemas/stats.ts +0 -62
  124. package/src/schemas/well-known.test.ts +0 -264
  125. package/src/schemas/well-known.ts +0 -252
  126. package/src/schemas/workspace-integrations.ts +0 -26
@@ -0,0 +1,623 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Per-row shape returned by `GET /v1/releases/latest`. Distinct from the
4
+ * shared `ReleaseItemSchema` because the latest-feed handler joins the
5
+ * source row in and exposes it as a nested `source` object instead of
6
+ * leaving the caller to do a second lookup.
7
+ *
8
+ * `type` is required here — the latest handler reads it directly from
9
+ * `releases.type` (NOT NULL with DB-default `'feature'`), so mid-deploy
10
+ * degrade-gracefully nullability doesn't apply on this path.
11
+ */
12
+ export declare const ReleaseLatestSourceSchema: z.ZodObject<{
13
+ slug: z.ZodString;
14
+ name: z.ZodString;
15
+ type: z.ZodEnum<{
16
+ agent: "agent";
17
+ appstore: "appstore";
18
+ feed: "feed";
19
+ github: "github";
20
+ scrape: "scrape";
21
+ video: "video";
22
+ }>;
23
+ orgSlug: z.ZodNullable<z.ZodString>;
24
+ orgName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ orgAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ orgGithubHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
28
+ desktop: "desktop";
29
+ docs: "docs";
30
+ integration: "integration";
31
+ mobile: "mobile";
32
+ platform: "platform";
33
+ sdk: "sdk";
34
+ tool: "tool";
35
+ }>>>;
36
+ }, z.core.$strip>;
37
+ export declare const ReleaseLatestProductSchema: z.ZodObject<{
38
+ slug: z.ZodString;
39
+ name: z.ZodString;
40
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
41
+ desktop: "desktop";
42
+ docs: "docs";
43
+ integration: "integration";
44
+ mobile: "mobile";
45
+ platform: "platform";
46
+ sdk: "sdk";
47
+ tool: "tool";
48
+ }>>>;
49
+ }, z.core.$strip>;
50
+ export declare const ReleaseLatestItemSchema: z.ZodObject<{
51
+ id: z.ZodString;
52
+ version: z.ZodNullable<z.ZodString>;
53
+ type: z.ZodEnum<{
54
+ feature: "feature";
55
+ rollup: "rollup";
56
+ }>;
57
+ title: z.ZodString;
58
+ summary: z.ZodNullable<z.ZodString>;
59
+ titleGenerated: z.ZodNullable<z.ZodString>;
60
+ titleShort: z.ZodNullable<z.ZodString>;
61
+ breaking: z.ZodOptional<z.ZodEnum<{
62
+ major: "major";
63
+ minor: "minor";
64
+ none: "none";
65
+ unknown: "unknown";
66
+ }>>;
67
+ importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
68
+ publishedAt: z.ZodNullable<z.ZodString>;
69
+ url: z.ZodNullable<z.ZodString>;
70
+ webUrl: z.ZodOptional<z.ZodString>;
71
+ media: z.ZodArray<z.ZodObject<{
72
+ type: z.ZodEnum<{
73
+ gif: "gif";
74
+ image: "image";
75
+ video: "video";
76
+ }>;
77
+ url: z.ZodString;
78
+ alt: z.ZodOptional<z.ZodString>;
79
+ r2Key: z.ZodOptional<z.ZodString>;
80
+ r2Url: z.ZodOptional<z.ZodString>;
81
+ linkUrl: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>>;
83
+ source: z.ZodObject<{
84
+ slug: z.ZodString;
85
+ name: z.ZodString;
86
+ type: z.ZodEnum<{
87
+ agent: "agent";
88
+ appstore: "appstore";
89
+ feed: "feed";
90
+ github: "github";
91
+ scrape: "scrape";
92
+ video: "video";
93
+ }>;
94
+ orgSlug: z.ZodNullable<z.ZodString>;
95
+ orgName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
96
+ orgAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ orgGithubHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
99
+ desktop: "desktop";
100
+ docs: "docs";
101
+ integration: "integration";
102
+ mobile: "mobile";
103
+ platform: "platform";
104
+ sdk: "sdk";
105
+ tool: "tool";
106
+ }>>>;
107
+ }, z.core.$strip>;
108
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
109
+ slug: z.ZodString;
110
+ name: z.ZodString;
111
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
112
+ desktop: "desktop";
113
+ docs: "docs";
114
+ integration: "integration";
115
+ mobile: "mobile";
116
+ platform: "platform";
117
+ sdk: "sdk";
118
+ tool: "tool";
119
+ }>>>;
120
+ }, z.core.$strip>>>;
121
+ groupSlug: z.ZodOptional<z.ZodString>;
122
+ groupName: z.ZodOptional<z.ZodString>;
123
+ coverageCount: z.ZodOptional<z.ZodNumber>;
124
+ contentChars: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
125
+ contentTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
126
+ composition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
127
+ bugs: z.ZodNumber;
128
+ features: z.ZodNumber;
129
+ enhancements: z.ZodNumber;
130
+ }, z.core.$strip>>>;
131
+ }, z.core.$strip>;
132
+ export declare const ReleaseLatestResponseSchema: z.ZodObject<{
133
+ releases: z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ version: z.ZodNullable<z.ZodString>;
136
+ type: z.ZodEnum<{
137
+ feature: "feature";
138
+ rollup: "rollup";
139
+ }>;
140
+ title: z.ZodString;
141
+ summary: z.ZodNullable<z.ZodString>;
142
+ titleGenerated: z.ZodNullable<z.ZodString>;
143
+ titleShort: z.ZodNullable<z.ZodString>;
144
+ breaking: z.ZodOptional<z.ZodEnum<{
145
+ major: "major";
146
+ minor: "minor";
147
+ none: "none";
148
+ unknown: "unknown";
149
+ }>>;
150
+ importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
151
+ publishedAt: z.ZodNullable<z.ZodString>;
152
+ url: z.ZodNullable<z.ZodString>;
153
+ webUrl: z.ZodOptional<z.ZodString>;
154
+ media: z.ZodArray<z.ZodObject<{
155
+ type: z.ZodEnum<{
156
+ gif: "gif";
157
+ image: "image";
158
+ video: "video";
159
+ }>;
160
+ url: z.ZodString;
161
+ alt: z.ZodOptional<z.ZodString>;
162
+ r2Key: z.ZodOptional<z.ZodString>;
163
+ r2Url: z.ZodOptional<z.ZodString>;
164
+ linkUrl: z.ZodOptional<z.ZodString>;
165
+ }, z.core.$strip>>;
166
+ source: z.ZodObject<{
167
+ slug: z.ZodString;
168
+ name: z.ZodString;
169
+ type: z.ZodEnum<{
170
+ agent: "agent";
171
+ appstore: "appstore";
172
+ feed: "feed";
173
+ github: "github";
174
+ scrape: "scrape";
175
+ video: "video";
176
+ }>;
177
+ orgSlug: z.ZodNullable<z.ZodString>;
178
+ orgName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
179
+ orgAvatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ orgGithubHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
181
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
182
+ desktop: "desktop";
183
+ docs: "docs";
184
+ integration: "integration";
185
+ mobile: "mobile";
186
+ platform: "platform";
187
+ sdk: "sdk";
188
+ tool: "tool";
189
+ }>>>;
190
+ }, z.core.$strip>;
191
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
192
+ slug: z.ZodString;
193
+ name: z.ZodString;
194
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
195
+ desktop: "desktop";
196
+ docs: "docs";
197
+ integration: "integration";
198
+ mobile: "mobile";
199
+ platform: "platform";
200
+ sdk: "sdk";
201
+ tool: "tool";
202
+ }>>>;
203
+ }, z.core.$strip>>>;
204
+ groupSlug: z.ZodOptional<z.ZodString>;
205
+ groupName: z.ZodOptional<z.ZodString>;
206
+ coverageCount: z.ZodOptional<z.ZodNumber>;
207
+ contentChars: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
208
+ contentTokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
209
+ composition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
210
+ bugs: z.ZodNumber;
211
+ features: z.ZodNumber;
212
+ enhancements: z.ZodNumber;
213
+ }, z.core.$strip>>>;
214
+ }, z.core.$strip>>;
215
+ }, z.core.$strip>;
216
+ /**
217
+ * Display fields for the counterpart release a coverage row points at —
218
+ * the canonical for a `coverage`-role response, or each rolled-up coverage
219
+ * release for a `canonical`-role response. Lets `GET /releases/:id/coverage`
220
+ * render a cluster without a follow-up `GET /releases/:id` per sibling.
221
+ * `null` when the counterpart is suppressed or its source was removed.
222
+ *
223
+ * Coverage-side rows are surfaced here on purpose, even though the
224
+ * `releases_visible` view (and thus `GET /releases/:id`) hides them — a
225
+ * cluster view's whole job is to show its members.
226
+ */
227
+ export declare const ReleaseCoverageSiblingSchema: z.ZodObject<{
228
+ id: z.ZodString;
229
+ version: z.ZodNullable<z.ZodString>;
230
+ title: z.ZodString;
231
+ sourceName: z.ZodString;
232
+ publishedAt: z.ZodNullable<z.ZodString>;
233
+ org: z.ZodNullable<z.ZodObject<{
234
+ slug: z.ZodString;
235
+ name: z.ZodString;
236
+ }, z.core.$strip>>;
237
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
238
+ url: z.ZodString;
239
+ alt: z.ZodOptional<z.ZodString>;
240
+ }, z.core.$strip>>>;
241
+ }, z.core.$strip>;
242
+ /**
243
+ * Single row of the `release_coverage` join table. Drives the
244
+ * GET /releases/:id/coverage response. `sibling` carries the counterpart
245
+ * release's display fields (see {@link ReleaseCoverageSiblingSchema}); it is
246
+ * optional so an older server that doesn't populate it still validates.
247
+ */
248
+ export declare const ReleaseCoverageRowSchema: z.ZodObject<{
249
+ coverageId: z.ZodString;
250
+ canonicalId: z.ZodString;
251
+ reason: z.ZodNullable<z.ZodString>;
252
+ decidedBy: z.ZodString;
253
+ decidedAt: z.ZodString;
254
+ sibling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
255
+ id: z.ZodString;
256
+ version: z.ZodNullable<z.ZodString>;
257
+ title: z.ZodString;
258
+ sourceName: z.ZodString;
259
+ publishedAt: z.ZodNullable<z.ZodString>;
260
+ org: z.ZodNullable<z.ZodObject<{
261
+ slug: z.ZodString;
262
+ name: z.ZodString;
263
+ }, z.core.$strip>>;
264
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
265
+ url: z.ZodString;
266
+ alt: z.ZodOptional<z.ZodString>;
267
+ }, z.core.$strip>>>;
268
+ }, z.core.$strip>>>;
269
+ }, z.core.$strip>;
270
+ /**
271
+ * Discriminated by `role`:
272
+ * - `standalone` — release is neither canonical nor coverage of anything.
273
+ * - `coverage` — release is coverage rolling up to `canonical`.
274
+ * - `canonical` — release is the canonical row; `covers` enumerates rollups.
275
+ */
276
+ export declare const ReleaseCoverageResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
277
+ role: z.ZodLiteral<"standalone">;
278
+ canonical: z.ZodNull;
279
+ covers: z.ZodArray<z.ZodNever>;
280
+ }, z.core.$strip>, z.ZodObject<{
281
+ role: z.ZodLiteral<"coverage">;
282
+ canonical: z.ZodObject<{
283
+ coverageId: z.ZodString;
284
+ canonicalId: z.ZodString;
285
+ reason: z.ZodNullable<z.ZodString>;
286
+ decidedBy: z.ZodString;
287
+ decidedAt: z.ZodString;
288
+ sibling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
289
+ id: z.ZodString;
290
+ version: z.ZodNullable<z.ZodString>;
291
+ title: z.ZodString;
292
+ sourceName: z.ZodString;
293
+ publishedAt: z.ZodNullable<z.ZodString>;
294
+ org: z.ZodNullable<z.ZodObject<{
295
+ slug: z.ZodString;
296
+ name: z.ZodString;
297
+ }, z.core.$strip>>;
298
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
299
+ url: z.ZodString;
300
+ alt: z.ZodOptional<z.ZodString>;
301
+ }, z.core.$strip>>>;
302
+ }, z.core.$strip>>>;
303
+ }, z.core.$strip>;
304
+ covers: z.ZodArray<z.ZodNever>;
305
+ }, z.core.$strip>, z.ZodObject<{
306
+ role: z.ZodLiteral<"canonical">;
307
+ canonical: z.ZodNull;
308
+ covers: z.ZodArray<z.ZodObject<{
309
+ coverageId: z.ZodString;
310
+ canonicalId: z.ZodString;
311
+ reason: z.ZodNullable<z.ZodString>;
312
+ decidedBy: z.ZodString;
313
+ decidedAt: z.ZodString;
314
+ sibling: z.ZodOptional<z.ZodNullable<z.ZodObject<{
315
+ id: z.ZodString;
316
+ version: z.ZodNullable<z.ZodString>;
317
+ title: z.ZodString;
318
+ sourceName: z.ZodString;
319
+ publishedAt: z.ZodNullable<z.ZodString>;
320
+ org: z.ZodNullable<z.ZodObject<{
321
+ slug: z.ZodString;
322
+ name: z.ZodString;
323
+ }, z.core.$strip>>;
324
+ thumbnail: z.ZodOptional<z.ZodNullable<z.ZodObject<{
325
+ url: z.ZodString;
326
+ alt: z.ZodOptional<z.ZodString>;
327
+ }, z.core.$strip>>>;
328
+ }, z.core.$strip>>>;
329
+ }, z.core.$strip>>;
330
+ }, z.core.$strip>], "role">;
331
+ /**
332
+ * Body accepted by `POST /v1/releases/:id/coverage`. `decidedBy` MUST be
333
+ * prefixed with `human:` or `agent:` so the audit trail records who linked
334
+ * the rows; the handler enforces this with a regex.
335
+ */
336
+ export declare const LinkReleaseCoverageBodySchema: z.ZodObject<{
337
+ coverageIds: z.ZodArray<z.ZodString>;
338
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
339
+ decidedBy: z.ZodString;
340
+ }, z.core.$strip>;
341
+ export declare const LinkReleaseCoverageResponseSchema: z.ZodObject<{
342
+ canonicalId: z.ZodString;
343
+ coverageIds: z.ZodArray<z.ZodString>;
344
+ linked: z.ZodNumber;
345
+ }, z.core.$strip>;
346
+ /**
347
+ * Response for `DELETE /v1/releases/:id/coverage`. Idempotent — the handler
348
+ * returns `{ unlinked: false }` when the release isn't in a cluster, so the
349
+ * remote client can skip a brittle error-message sniff.
350
+ */
351
+ export declare const UnlinkReleaseCoverageResponseSchema: z.ZodObject<{
352
+ unlinked: z.ZodBoolean;
353
+ }, z.core.$strip>;
354
+ /**
355
+ * Row returned by `GET /v1/releases?hasMedia=true`. Internal/admin escape
356
+ * hatch consumed by the `media backfill` CLI command.
357
+ */
358
+ export declare const ReleaseWithMediaRowSchema: z.ZodObject<{
359
+ id: z.ZodString;
360
+ sourceId: z.ZodString;
361
+ media: z.ZodNullable<z.ZodString>;
362
+ }, z.core.$strip>;
363
+ export declare const ReleasesWithMediaResponseSchema: z.ZodArray<z.ZodObject<{
364
+ id: z.ZodString;
365
+ sourceId: z.ZodString;
366
+ media: z.ZodNullable<z.ZodString>;
367
+ }, z.core.$strip>>;
368
+ /**
369
+ * Nested org context joined into the `GET /v1/releases/:id` response.
370
+ * Both fields are nullable — releases whose source has no org attached
371
+ * return `null` for this object entirely.
372
+ */
373
+ export declare const ReleaseDetailOrgSchema: z.ZodObject<{
374
+ slug: z.ZodString;
375
+ name: z.ZodString;
376
+ avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
377
+ discovery: z.ZodOptional<z.ZodEnum<{
378
+ agent: "agent";
379
+ curated: "curated";
380
+ on_demand: "on_demand";
381
+ }>>;
382
+ isHidden: z.ZodOptional<z.ZodBoolean>;
383
+ }, z.core.$strip>;
384
+ /**
385
+ * Full release detail returned by `GET /v1/releases/:id`. Joins source
386
+ * name/slug/type and a nullable org object; media is parsed from the raw
387
+ * JSON stored in D1 and typed URLs are rewritten to the CDN origin. The
388
+ * route only surfaces non-suppressed, non-coverage rows (filtered via the
389
+ * `releases_visible` view).
390
+ */
391
+ export declare const ReleaseDetailResponseSchema: z.ZodObject<{
392
+ id: z.ZodString;
393
+ sourceId: z.ZodString;
394
+ version: z.ZodNullable<z.ZodString>;
395
+ type: z.ZodEnum<{
396
+ feature: "feature";
397
+ rollup: "rollup";
398
+ }>;
399
+ title: z.ZodString;
400
+ content: z.ZodString;
401
+ summary: z.ZodNullable<z.ZodString>;
402
+ titleGenerated: z.ZodNullable<z.ZodString>;
403
+ titleShort: z.ZodNullable<z.ZodString>;
404
+ breaking: z.ZodOptional<z.ZodEnum<{
405
+ major: "major";
406
+ minor: "minor";
407
+ none: "none";
408
+ unknown: "unknown";
409
+ }>>;
410
+ importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
411
+ migrationNotes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
412
+ url: z.ZodNullable<z.ZodString>;
413
+ webUrl: z.ZodOptional<z.ZodString>;
414
+ contentHash: z.ZodNullable<z.ZodString>;
415
+ media: z.ZodArray<z.ZodObject<{
416
+ type: z.ZodEnum<{
417
+ gif: "gif";
418
+ image: "image";
419
+ video: "video";
420
+ }>;
421
+ url: z.ZodString;
422
+ alt: z.ZodOptional<z.ZodString>;
423
+ r2Key: z.ZodOptional<z.ZodString>;
424
+ r2Url: z.ZodOptional<z.ZodString>;
425
+ linkUrl: z.ZodOptional<z.ZodString>;
426
+ }, z.core.$strip>>;
427
+ publishedAt: z.ZodNullable<z.ZodString>;
428
+ suppressed: z.ZodNullable<z.ZodBoolean>;
429
+ suppressedReason: z.ZodNullable<z.ZodString>;
430
+ prerelease: z.ZodNullable<z.ZodBoolean>;
431
+ fetchedAt: z.ZodNullable<z.ZodString>;
432
+ sourceName: z.ZodNullable<z.ZodString>;
433
+ sourceSlug: z.ZodNullable<z.ZodString>;
434
+ sourceType: z.ZodNullable<z.ZodEnum<{
435
+ agent: "agent";
436
+ appstore: "appstore";
437
+ feed: "feed";
438
+ github: "github";
439
+ scrape: "scrape";
440
+ video: "video";
441
+ }>>;
442
+ org: z.ZodNullable<z.ZodObject<{
443
+ slug: z.ZodString;
444
+ name: z.ZodString;
445
+ avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
+ discovery: z.ZodOptional<z.ZodEnum<{
447
+ agent: "agent";
448
+ curated: "curated";
449
+ on_demand: "on_demand";
450
+ }>>;
451
+ isHidden: z.ZodOptional<z.ZodBoolean>;
452
+ }, z.core.$strip>>;
453
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
454
+ slug: z.ZodString;
455
+ name: z.ZodString;
456
+ kind: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
457
+ desktop: "desktop";
458
+ docs: "docs";
459
+ integration: "integration";
460
+ mobile: "mobile";
461
+ platform: "platform";
462
+ sdk: "sdk";
463
+ tool: "tool";
464
+ }>>>;
465
+ }, z.core.$strip>>>;
466
+ composition: z.ZodNullable<z.ZodObject<{
467
+ bugs: z.ZodNumber;
468
+ features: z.ZodNumber;
469
+ enhancements: z.ZodNumber;
470
+ }, z.core.$strip>>;
471
+ appStore: z.ZodOptional<z.ZodNullable<z.ZodObject<{
472
+ platform: z.ZodEnum<{
473
+ ios: "ios";
474
+ macos: "macos";
475
+ }>;
476
+ iconUrl: z.ZodNullable<z.ZodString>;
477
+ }, z.core.$strip>>>;
478
+ video: z.ZodOptional<z.ZodNullable<z.ZodObject<{
479
+ provider: z.ZodEnum<{
480
+ vimeo: "vimeo";
481
+ wistia: "wistia";
482
+ youtube: "youtube";
483
+ }>;
484
+ }, z.core.$strip>>>;
485
+ sourceIsHidden: z.ZodOptional<z.ZodBoolean>;
486
+ }, z.core.$strip>;
487
+ /**
488
+ * `error.details` on a 409 from `PATCH /v1/releases/:id` when the new `url`
489
+ * collides with `UNIQUE(source_id, url)`. Additive: older servers omit `details`.
490
+ */
491
+ export declare const ReleaseUrlConflictDetailsSchema: z.ZodObject<{
492
+ releaseId: z.ZodString;
493
+ }, z.core.$strip>;
494
+ /**
495
+ * Body accepted by `PATCH /v1/releases/:id`. All fields are optional;
496
+ * omitted fields are not updated. The nullable string columns (`version`,
497
+ * `url`, `publishedAt`, `contentHash`) accept a string or `null`. AI-generated
498
+ * fields (`summary`, `titleGenerated`, `titleShort`) accept `null` to
499
+ * explicitly clear the stored value. Non-whitelisted fields are rejected
500
+ * via `.strict()` — the handler also re-runs the field-set check after
501
+ * sanitization so an empty update payload still 400s.
502
+ */
503
+ export declare const UpdateReleaseBodySchema: z.ZodObject<{
504
+ title: z.ZodOptional<z.ZodString>;
505
+ content: z.ZodOptional<z.ZodString>;
506
+ version: z.ZodOptional<z.ZodNullable<z.ZodString>>;
507
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
508
+ publishedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
509
+ contentHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
511
+ titleGenerated: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
+ titleShort: z.ZodOptional<z.ZodNullable<z.ZodString>>;
513
+ composition: z.ZodOptional<z.ZodNullable<z.ZodObject<{
514
+ bugs: z.ZodNumber;
515
+ features: z.ZodNumber;
516
+ enhancements: z.ZodNumber;
517
+ }, z.core.$strip>>>;
518
+ media: z.ZodOptional<z.ZodArray<z.ZodObject<{
519
+ type: z.ZodEnum<{
520
+ gif: "gif";
521
+ image: "image";
522
+ video: "video";
523
+ }>;
524
+ url: z.ZodString;
525
+ alt: z.ZodOptional<z.ZodString>;
526
+ r2Key: z.ZodOptional<z.ZodString>;
527
+ r2Url: z.ZodOptional<z.ZodString>;
528
+ linkUrl: z.ZodOptional<z.ZodString>;
529
+ }, z.core.$strip>>>;
530
+ }, z.core.$strict>;
531
+ /**
532
+ * Response returned by `PATCH /v1/releases/:id`. The handler returns the raw
533
+ * Drizzle row from the `releases` table — distinct from the augmented
534
+ * `ReleaseDetailResponseSchema` shape served by `GET /v1/releases/:id`, which
535
+ * adds joined source/org metadata and parses `media` from raw JSON. Clients
536
+ * that need the augmented shape after an edit should re-fetch via GET.
537
+ */
538
+ export declare const ReleasePatchResponseSchema: z.ZodObject<{
539
+ id: z.ZodString;
540
+ sourceId: z.ZodString;
541
+ version: z.ZodNullable<z.ZodString>;
542
+ type: z.ZodEnum<{
543
+ feature: "feature";
544
+ rollup: "rollup";
545
+ }>;
546
+ title: z.ZodString;
547
+ content: z.ZodString;
548
+ summary: z.ZodNullable<z.ZodString>;
549
+ titleGenerated: z.ZodNullable<z.ZodString>;
550
+ titleShort: z.ZodNullable<z.ZodString>;
551
+ url: z.ZodNullable<z.ZodString>;
552
+ contentHash: z.ZodNullable<z.ZodString>;
553
+ metadata: z.ZodNullable<z.ZodString>;
554
+ media: z.ZodNullable<z.ZodString>;
555
+ publishedAt: z.ZodNullable<z.ZodString>;
556
+ prerelease: z.ZodNullable<z.ZodBoolean>;
557
+ suppressed: z.ZodNullable<z.ZodBoolean>;
558
+ suppressedReason: z.ZodNullable<z.ZodString>;
559
+ fetchedAt: z.ZodNullable<z.ZodString>;
560
+ embeddedAt: z.ZodNullable<z.ZodString>;
561
+ }, z.core.$strip>;
562
+ /** Response returned by `DELETE /v1/releases/:id`. */
563
+ export declare const ReleaseDeleteResponseSchema: z.ZodObject<{
564
+ deleted: z.ZodLiteral<true>;
565
+ }, z.core.$strip>;
566
+ /** Body accepted by `DELETE /v1/releases/batch`. */
567
+ export declare const ReleaseBatchDeleteBodySchema: z.ZodObject<{
568
+ releaseIds: z.ZodArray<z.ZodString>;
569
+ }, z.core.$strip>;
570
+ /** Response returned by `DELETE /v1/releases/batch`. */
571
+ export declare const ReleaseBatchDeleteResponseSchema: z.ZodObject<{
572
+ deleted: z.ZodNumber;
573
+ }, z.core.$strip>;
574
+ /**
575
+ * Body accepted by `POST /v1/releases/batch-suppress`. When `suppressed` is
576
+ * true the optional `reason` is stored in `suppressed_reason`; when false the
577
+ * reason is cleared.
578
+ */
579
+ export declare const ReleaseBatchSuppressBodySchema: z.ZodObject<{
580
+ releaseIds: z.ZodArray<z.ZodString>;
581
+ suppressed: z.ZodBoolean;
582
+ reason: z.ZodOptional<z.ZodString>;
583
+ }, z.core.$strip>;
584
+ /** Response returned by `POST /v1/releases/batch-suppress`. */
585
+ export declare const ReleaseBatchSuppressResponseSchema: z.ZodObject<{
586
+ updated: z.ZodNumber;
587
+ }, z.core.$strip>;
588
+ /** Response returned by `POST /v1/releases/:id/suppress`. */
589
+ export declare const ReleaseSuppressResponseSchema: z.ZodObject<{
590
+ suppressed: z.ZodLiteral<true>;
591
+ }, z.core.$strip>;
592
+ /** Response returned by `POST /v1/releases/:id/unsuppress`. */
593
+ export declare const ReleaseUnsuppressResponseSchema: z.ZodObject<{
594
+ unsuppressed: z.ZodLiteral<true>;
595
+ }, z.core.$strip>;
596
+ /**
597
+ * Body accepted by `POST /v1/releases/:id/suppress`. The `reason` field
598
+ * is optional; when omitted the stored `suppressed_reason` is set to null.
599
+ */
600
+ export declare const ReleaseSuppressBodySchema: z.ZodObject<{
601
+ reason: z.ZodOptional<z.ZodString>;
602
+ }, z.core.$strip>;
603
+ /**
604
+ * WebSocket message schema for the `GET /v1/releases/stream` endpoint.
605
+ * Each message is a JSON object with one of the following shapes:
606
+ * - `{ type: "ready", seq: number }` — sent on connect to give the caller
607
+ * the current head sequence number for later resume.
608
+ * - `{ type: "release.created", seq: number, release: object }` — a new
609
+ * release was indexed; `release` carries the full release row.
610
+ * - `{ type: "snapshot_gap" }` — the requested `since` sequence fell
611
+ * behind the oldest buffered event; the client must REST-backfill.
612
+ */
613
+ export declare const ReleaseStreamMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
614
+ type: z.ZodLiteral<"ready">;
615
+ seq: z.ZodNumber;
616
+ }, z.core.$strip>, z.ZodObject<{
617
+ type: z.ZodLiteral<"release.created">;
618
+ seq: z.ZodNumber;
619
+ release: z.ZodRecord<z.ZodString, z.ZodUnknown>;
620
+ }, z.core.$strip>, z.ZodObject<{
621
+ type: z.ZodLiteral<"snapshot_gap">;
622
+ }, z.core.$strip>], "type">;
623
+ //# sourceMappingURL=releases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../src/schemas/releases.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;iBAMrC,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiDlC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEtC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;iBAUvC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;iBAOnC,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgBxC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;iBAI5C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,mCAAmC;;iBAE9C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;kBAAqC,CAAC;AAElF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;iBAqBjC,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0DtC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;iBAMuB,CAAC;AAEpE;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAoBzB,CAAC;AAEZ;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;iBAqBrC,CAAC;AAEH,sDAAsD;AACtD,eAAO,MAAM,2BAA2B;;iBAEtC,CAAC;AAEH,oDAAoD;AACpD,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,wDAAwD;AACxD,eAAO,MAAM,gCAAgC;;iBAE3C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,8BAA8B;;;;iBAIzC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,+DAA+D;AAC/D,eAAO,MAAM,+BAA+B;;iBAE1C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;iBAEpC,CAAC;AAEH;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;2BAQrC,CAAC"}