@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.
- package/README.md +14 -6
- package/dist/api-types.d.ts +1168 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api-types.js +134 -0
- package/dist/schemas/account-profile.d.ts +29 -0
- package/dist/schemas/account-profile.d.ts.map +1 -0
- package/dist/schemas/account-profile.js +24 -0
- package/dist/schemas/ai-models.d.ts +67 -0
- package/dist/schemas/ai-models.d.ts.map +1 -0
- package/{src/schemas/ai-models.ts → dist/schemas/ai-models.js} +25 -31
- package/dist/schemas/api-keys.d.ts +71 -0
- package/dist/schemas/api-keys.d.ts.map +1 -0
- package/dist/schemas/api-keys.js +32 -0
- package/dist/schemas/classifications.d.ts +134 -0
- package/dist/schemas/classifications.d.ts.map +1 -0
- package/dist/schemas/classifications.js +96 -0
- package/dist/schemas/collections.d.ts +605 -0
- package/dist/schemas/collections.d.ts.map +1 -0
- package/dist/schemas/collections.js +320 -0
- package/dist/schemas/datasets.d.ts +34 -0
- package/dist/schemas/datasets.d.ts.map +1 -0
- package/dist/schemas/datasets.js +11 -0
- package/dist/schemas/errors.d.ts +43 -0
- package/dist/schemas/errors.d.ts.map +1 -0
- package/dist/schemas/errors.js +61 -0
- package/dist/schemas/feedback.d.ts +134 -0
- package/dist/schemas/feedback.d.ts.map +1 -0
- package/dist/schemas/feedback.js +76 -0
- package/dist/schemas/follows.d.ts +154 -0
- package/dist/schemas/follows.d.ts.map +1 -0
- package/dist/schemas/follows.js +42 -0
- package/dist/schemas/listing.d.ts +374 -0
- package/dist/schemas/listing.d.ts.map +1 -0
- package/dist/schemas/listing.js +175 -0
- package/dist/schemas/lookups.d.ts +285 -0
- package/dist/schemas/lookups.d.ts.map +1 -0
- package/{src/schemas/lookups.ts → dist/schemas/lookups.js} +67 -80
- package/dist/schemas/marketing-classifier.d.ts +32 -0
- package/dist/schemas/marketing-classifier.d.ts.map +1 -0
- package/{src/schemas/marketing-classifier.ts → dist/schemas/marketing-classifier.js} +14 -18
- package/dist/schemas/orgs.d.ts +950 -0
- package/dist/schemas/orgs.d.ts.map +1 -0
- package/dist/schemas/orgs.js +473 -0
- package/dist/schemas/overviews.d.ts +205 -0
- package/dist/schemas/overviews.d.ts.map +1 -0
- package/{src/schemas/overviews.ts → dist/schemas/overviews.js} +41 -54
- package/dist/schemas/products.d.ts +595 -0
- package/dist/schemas/products.d.ts.map +1 -0
- package/{src/schemas/products.ts → dist/schemas/products.js} +113 -136
- package/dist/schemas/publish-tokens.d.ts +55 -0
- package/dist/schemas/publish-tokens.d.ts.map +1 -0
- package/{src/schemas/publish-tokens.ts → dist/schemas/publish-tokens.js} +18 -29
- package/dist/schemas/recommendations.d.ts +52 -0
- package/dist/schemas/recommendations.d.ts.map +1 -0
- package/dist/schemas/recommendations.js +58 -0
- package/dist/schemas/related.d.ts +331 -0
- package/dist/schemas/related.d.ts.map +1 -0
- package/dist/schemas/related.js +115 -0
- package/dist/schemas/releases.d.ts +623 -0
- package/dist/schemas/releases.d.ts.map +1 -0
- package/dist/schemas/releases.js +414 -0
- package/dist/schemas/resolve.d.ts +259 -0
- package/dist/schemas/resolve.d.ts.map +1 -0
- package/{src/schemas/resolve.ts → dist/schemas/resolve.js} +2 -5
- package/dist/schemas/search.d.ts +475 -0
- package/dist/schemas/search.d.ts.map +1 -0
- package/dist/schemas/search.js +258 -0
- package/dist/schemas/semantic-alert-summary.d.ts +54 -0
- package/dist/schemas/semantic-alert-summary.d.ts.map +1 -0
- package/dist/schemas/semantic-alert-summary.js +57 -0
- package/dist/schemas/semantic-alerts.d.ts +41 -0
- package/dist/schemas/semantic-alerts.d.ts.map +1 -0
- package/dist/schemas/semantic-alerts.js +42 -0
- package/dist/schemas/shared.d.ts +247 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +248 -0
- package/dist/schemas/site-notice.d.ts +35 -0
- package/dist/schemas/site-notice.d.ts.map +1 -0
- package/{src/schemas/site-notice.ts → dist/schemas/site-notice.js} +14 -18
- package/dist/schemas/sitemap.d.ts +97 -0
- package/dist/schemas/sitemap.d.ts.map +1 -0
- package/dist/schemas/sitemap.js +107 -0
- package/dist/schemas/sources.d.ts +1145 -0
- package/dist/schemas/sources.d.ts.map +1 -0
- package/dist/schemas/sources.js +645 -0
- package/dist/schemas/stats.d.ts +82 -0
- package/dist/schemas/stats.d.ts.map +1 -0
- package/dist/schemas/stats.js +59 -0
- package/dist/schemas/taxonomy.d.ts +344 -0
- package/dist/schemas/taxonomy.d.ts.map +1 -0
- package/{src/schemas/taxonomy.ts → dist/schemas/taxonomy.js} +47 -58
- package/dist/schemas/webhooks.d.ts +618 -0
- package/dist/schemas/webhooks.d.ts.map +1 -0
- package/dist/schemas/webhooks.js +191 -0
- package/dist/schemas/well-known.d.ts +302 -0
- package/dist/schemas/well-known.d.ts.map +1 -0
- package/dist/schemas/well-known.js +192 -0
- package/dist/schemas/workspace-integrations.d.ts +27 -0
- package/dist/schemas/workspace-integrations.d.ts.map +1 -0
- package/dist/schemas/workspace-integrations.js +22 -0
- package/package.json +16 -5
- package/src/api-types.ts +0 -2229
- package/src/schemas/account-profile.ts +0 -28
- package/src/schemas/ai-models.test.ts +0 -29
- package/src/schemas/classifications.ts +0 -109
- package/src/schemas/collections.ts +0 -346
- package/src/schemas/datasets.ts +0 -31
- package/src/schemas/errors.test.ts +0 -55
- package/src/schemas/errors.ts +0 -81
- package/src/schemas/feedback.ts +0 -56
- package/src/schemas/listing.ts +0 -226
- package/src/schemas/orgs.ts +0 -533
- package/src/schemas/recommendations.ts +0 -39
- package/src/schemas/related.ts +0 -126
- package/src/schemas/releases.ts +0 -449
- package/src/schemas/search.ts +0 -274
- package/src/schemas/semantic-alert-summary.ts +0 -65
- package/src/schemas/shared.notice.test.ts +0 -36
- package/src/schemas/shared.ts +0 -267
- package/src/schemas/site-notice.test.ts +0 -67
- package/src/schemas/sitemap.ts +0 -117
- package/src/schemas/sources.ts +0 -674
- package/src/schemas/stats.ts +0 -62
- package/src/schemas/well-known.test.ts +0 -264
- package/src/schemas/well-known.ts +0 -252
- package/src/schemas/workspace-integrations.ts +0 -26
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Anchor scope for related-* lookups. `org` filters the Vectorize query by
|
|
4
|
+
* the anchor's org id; `global` (default) runs unscoped.
|
|
5
|
+
*/
|
|
6
|
+
export declare const RelatedScopeSchema: z.ZodEnum<{
|
|
7
|
+
global: "global";
|
|
8
|
+
org: "org";
|
|
9
|
+
}>;
|
|
10
|
+
/** Thumbnail picked from the release's first image-like media entry. */
|
|
11
|
+
export declare const RelatedReleaseThumbnailSchema: z.ZodObject<{
|
|
12
|
+
url: z.ZodString;
|
|
13
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
/** Owning source rollup attached to each related-release row. */
|
|
16
|
+
export declare const RelatedReleaseSourceSchema: z.ZodObject<{
|
|
17
|
+
id: z.ZodString;
|
|
18
|
+
slug: z.ZodString;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
21
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
22
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
23
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
24
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
platform: z.ZodEnum<{
|
|
26
|
+
ios: "ios";
|
|
27
|
+
macos: "macos";
|
|
28
|
+
}>;
|
|
29
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
30
|
+
}, z.core.$strip>>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
/**
|
|
33
|
+
* One neighbor returned by `GET /v1/related/releases`. `score` is the
|
|
34
|
+
* Vectorize cosine similarity from the underlying query.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RelatedReleaseItemSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
version: z.ZodNullable<z.ZodString>;
|
|
40
|
+
url: z.ZodNullable<z.ZodString>;
|
|
41
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
42
|
+
summary: z.ZodString;
|
|
43
|
+
titleGenerated: z.ZodNullable<z.ZodString>;
|
|
44
|
+
titleShort: z.ZodNullable<z.ZodString>;
|
|
45
|
+
importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
46
|
+
thumbnail: z.ZodNullable<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, z.core.$strip>>;
|
|
50
|
+
score: z.ZodNumber;
|
|
51
|
+
source: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
slug: z.ZodString;
|
|
54
|
+
name: z.ZodString;
|
|
55
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
56
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
57
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
58
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
59
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
60
|
+
platform: z.ZodEnum<{
|
|
61
|
+
ios: "ios";
|
|
62
|
+
macos: "macos";
|
|
63
|
+
}>;
|
|
64
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
66
|
+
}, z.core.$strip>;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
/**
|
|
69
|
+
* One neighbor returned by `GET /v1/related/sources`. Carries enough
|
|
70
|
+
* source + org + recent-release stats for the rail card to render without
|
|
71
|
+
* a follow-up request.
|
|
72
|
+
*/
|
|
73
|
+
export declare const RelatedSourceItemSchema: z.ZodObject<{
|
|
74
|
+
id: z.ZodString;
|
|
75
|
+
slug: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
type: z.ZodString;
|
|
78
|
+
url: z.ZodNullable<z.ZodString>;
|
|
79
|
+
score: z.ZodNumber;
|
|
80
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
81
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
82
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
83
|
+
releaseCount: z.ZodNumber;
|
|
84
|
+
latestDate: z.ZodNullable<z.ZodString>;
|
|
85
|
+
latestTitle: z.ZodNullable<z.ZodString>;
|
|
86
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
87
|
+
recentCount: z.ZodNumber;
|
|
88
|
+
}, z.core.$strip>;
|
|
89
|
+
/**
|
|
90
|
+
* Successful response from `GET /v1/related/releases`. The handler returns
|
|
91
|
+
* `{scope, items}` when Vectorize is reachable and the anchor has a vector.
|
|
92
|
+
*/
|
|
93
|
+
export declare const RelatedReleasesOkResponseSchema: z.ZodObject<{
|
|
94
|
+
scope: z.ZodEnum<{
|
|
95
|
+
global: "global";
|
|
96
|
+
org: "org";
|
|
97
|
+
}>;
|
|
98
|
+
items: z.ZodArray<z.ZodObject<{
|
|
99
|
+
id: z.ZodString;
|
|
100
|
+
title: z.ZodString;
|
|
101
|
+
version: z.ZodNullable<z.ZodString>;
|
|
102
|
+
url: z.ZodNullable<z.ZodString>;
|
|
103
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
104
|
+
summary: z.ZodString;
|
|
105
|
+
titleGenerated: z.ZodNullable<z.ZodString>;
|
|
106
|
+
titleShort: z.ZodNullable<z.ZodString>;
|
|
107
|
+
importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
108
|
+
thumbnail: z.ZodNullable<z.ZodObject<{
|
|
109
|
+
url: z.ZodString;
|
|
110
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
score: z.ZodNumber;
|
|
113
|
+
source: z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
slug: z.ZodString;
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
118
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
119
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
120
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
121
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
122
|
+
platform: z.ZodEnum<{
|
|
123
|
+
ios: "ios";
|
|
124
|
+
macos: "macos";
|
|
125
|
+
}>;
|
|
126
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
127
|
+
}, z.core.$strip>>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
}, z.core.$strip>>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
/**
|
|
132
|
+
* Degraded response from `GET /v1/related/releases`. Returned (HTTP 200) when
|
|
133
|
+
* Vectorize bindings are missing, the anchor hasn't been embedded yet, or a
|
|
134
|
+
* downstream call errored. Callers render nothing in this case rather than
|
|
135
|
+
* surfacing a hard failure. `degradedReason` is human-readable, not stable.
|
|
136
|
+
*/
|
|
137
|
+
export declare const RelatedReleasesDegradedResponseSchema: z.ZodObject<{
|
|
138
|
+
degraded: z.ZodLiteral<true>;
|
|
139
|
+
degradedReason: z.ZodString;
|
|
140
|
+
items: z.ZodArray<z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
title: z.ZodString;
|
|
143
|
+
version: z.ZodNullable<z.ZodString>;
|
|
144
|
+
url: z.ZodNullable<z.ZodString>;
|
|
145
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
146
|
+
summary: z.ZodString;
|
|
147
|
+
titleGenerated: z.ZodNullable<z.ZodString>;
|
|
148
|
+
titleShort: z.ZodNullable<z.ZodString>;
|
|
149
|
+
importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
150
|
+
thumbnail: z.ZodNullable<z.ZodObject<{
|
|
151
|
+
url: z.ZodString;
|
|
152
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
score: z.ZodNumber;
|
|
155
|
+
source: z.ZodObject<{
|
|
156
|
+
id: z.ZodString;
|
|
157
|
+
slug: z.ZodString;
|
|
158
|
+
name: z.ZodString;
|
|
159
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
160
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
161
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
162
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
163
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
164
|
+
platform: z.ZodEnum<{
|
|
165
|
+
ios: "ios";
|
|
166
|
+
macos: "macos";
|
|
167
|
+
}>;
|
|
168
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
}, z.core.$strip>;
|
|
173
|
+
export declare const RelatedReleasesResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
174
|
+
scope: z.ZodEnum<{
|
|
175
|
+
global: "global";
|
|
176
|
+
org: "org";
|
|
177
|
+
}>;
|
|
178
|
+
items: z.ZodArray<z.ZodObject<{
|
|
179
|
+
id: z.ZodString;
|
|
180
|
+
title: z.ZodString;
|
|
181
|
+
version: z.ZodNullable<z.ZodString>;
|
|
182
|
+
url: z.ZodNullable<z.ZodString>;
|
|
183
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
184
|
+
summary: z.ZodString;
|
|
185
|
+
titleGenerated: z.ZodNullable<z.ZodString>;
|
|
186
|
+
titleShort: z.ZodNullable<z.ZodString>;
|
|
187
|
+
importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
188
|
+
thumbnail: z.ZodNullable<z.ZodObject<{
|
|
189
|
+
url: z.ZodString;
|
|
190
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
191
|
+
}, z.core.$strip>>;
|
|
192
|
+
score: z.ZodNumber;
|
|
193
|
+
source: z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
slug: z.ZodString;
|
|
196
|
+
name: z.ZodString;
|
|
197
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
198
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
199
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
200
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
201
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
202
|
+
platform: z.ZodEnum<{
|
|
203
|
+
ios: "ios";
|
|
204
|
+
macos: "macos";
|
|
205
|
+
}>;
|
|
206
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
207
|
+
}, z.core.$strip>>;
|
|
208
|
+
}, z.core.$strip>;
|
|
209
|
+
}, z.core.$strip>>;
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
+
degraded: z.ZodLiteral<true>;
|
|
212
|
+
degradedReason: z.ZodString;
|
|
213
|
+
items: z.ZodArray<z.ZodObject<{
|
|
214
|
+
id: z.ZodString;
|
|
215
|
+
title: z.ZodString;
|
|
216
|
+
version: z.ZodNullable<z.ZodString>;
|
|
217
|
+
url: z.ZodNullable<z.ZodString>;
|
|
218
|
+
publishedAt: z.ZodNullable<z.ZodString>;
|
|
219
|
+
summary: z.ZodString;
|
|
220
|
+
titleGenerated: z.ZodNullable<z.ZodString>;
|
|
221
|
+
titleShort: z.ZodNullable<z.ZodString>;
|
|
222
|
+
importance: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
|
+
thumbnail: z.ZodNullable<z.ZodObject<{
|
|
224
|
+
url: z.ZodString;
|
|
225
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
226
|
+
}, z.core.$strip>>;
|
|
227
|
+
score: z.ZodNumber;
|
|
228
|
+
source: z.ZodObject<{
|
|
229
|
+
id: z.ZodString;
|
|
230
|
+
slug: z.ZodString;
|
|
231
|
+
name: z.ZodString;
|
|
232
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
233
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
234
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
235
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
236
|
+
appStore: z.ZodOptional<z.ZodObject<{
|
|
237
|
+
platform: z.ZodEnum<{
|
|
238
|
+
ios: "ios";
|
|
239
|
+
macos: "macos";
|
|
240
|
+
}>;
|
|
241
|
+
iconUrl: z.ZodNullable<z.ZodString>;
|
|
242
|
+
}, z.core.$strip>>;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
}, z.core.$strip>]>;
|
|
246
|
+
/** Successful response from `GET /v1/related/sources`. */
|
|
247
|
+
export declare const RelatedSourcesOkResponseSchema: z.ZodObject<{
|
|
248
|
+
scope: z.ZodEnum<{
|
|
249
|
+
global: "global";
|
|
250
|
+
org: "org";
|
|
251
|
+
}>;
|
|
252
|
+
items: z.ZodArray<z.ZodObject<{
|
|
253
|
+
id: z.ZodString;
|
|
254
|
+
slug: z.ZodString;
|
|
255
|
+
name: z.ZodString;
|
|
256
|
+
type: z.ZodString;
|
|
257
|
+
url: z.ZodNullable<z.ZodString>;
|
|
258
|
+
score: z.ZodNumber;
|
|
259
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
260
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
261
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
262
|
+
releaseCount: z.ZodNumber;
|
|
263
|
+
latestDate: z.ZodNullable<z.ZodString>;
|
|
264
|
+
latestTitle: z.ZodNullable<z.ZodString>;
|
|
265
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
266
|
+
recentCount: z.ZodNumber;
|
|
267
|
+
}, z.core.$strip>>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
/** Degraded response from `GET /v1/related/sources`. Same semantics as the releases variant. */
|
|
270
|
+
export declare const RelatedSourcesDegradedResponseSchema: z.ZodObject<{
|
|
271
|
+
degraded: z.ZodLiteral<true>;
|
|
272
|
+
degradedReason: z.ZodString;
|
|
273
|
+
items: z.ZodArray<z.ZodObject<{
|
|
274
|
+
id: z.ZodString;
|
|
275
|
+
slug: z.ZodString;
|
|
276
|
+
name: z.ZodString;
|
|
277
|
+
type: z.ZodString;
|
|
278
|
+
url: z.ZodNullable<z.ZodString>;
|
|
279
|
+
score: z.ZodNumber;
|
|
280
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
281
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
282
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
283
|
+
releaseCount: z.ZodNumber;
|
|
284
|
+
latestDate: z.ZodNullable<z.ZodString>;
|
|
285
|
+
latestTitle: z.ZodNullable<z.ZodString>;
|
|
286
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
287
|
+
recentCount: z.ZodNumber;
|
|
288
|
+
}, z.core.$strip>>;
|
|
289
|
+
}, z.core.$strip>;
|
|
290
|
+
export declare const RelatedSourcesResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
291
|
+
scope: z.ZodEnum<{
|
|
292
|
+
global: "global";
|
|
293
|
+
org: "org";
|
|
294
|
+
}>;
|
|
295
|
+
items: z.ZodArray<z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
slug: z.ZodString;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
type: z.ZodString;
|
|
300
|
+
url: z.ZodNullable<z.ZodString>;
|
|
301
|
+
score: z.ZodNumber;
|
|
302
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
303
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
304
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
305
|
+
releaseCount: z.ZodNumber;
|
|
306
|
+
latestDate: z.ZodNullable<z.ZodString>;
|
|
307
|
+
latestTitle: z.ZodNullable<z.ZodString>;
|
|
308
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
309
|
+
recentCount: z.ZodNumber;
|
|
310
|
+
}, z.core.$strip>>;
|
|
311
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
312
|
+
degraded: z.ZodLiteral<true>;
|
|
313
|
+
degradedReason: z.ZodString;
|
|
314
|
+
items: z.ZodArray<z.ZodObject<{
|
|
315
|
+
id: z.ZodString;
|
|
316
|
+
slug: z.ZodString;
|
|
317
|
+
name: z.ZodString;
|
|
318
|
+
type: z.ZodString;
|
|
319
|
+
url: z.ZodNullable<z.ZodString>;
|
|
320
|
+
score: z.ZodNumber;
|
|
321
|
+
orgSlug: z.ZodNullable<z.ZodString>;
|
|
322
|
+
orgName: z.ZodNullable<z.ZodString>;
|
|
323
|
+
orgAvatarUrl: z.ZodNullable<z.ZodString>;
|
|
324
|
+
releaseCount: z.ZodNumber;
|
|
325
|
+
latestDate: z.ZodNullable<z.ZodString>;
|
|
326
|
+
latestTitle: z.ZodNullable<z.ZodString>;
|
|
327
|
+
latestVersion: z.ZodNullable<z.ZodString>;
|
|
328
|
+
recentCount: z.ZodNumber;
|
|
329
|
+
}, z.core.$strip>>;
|
|
330
|
+
}, z.core.$strip>]>;
|
|
331
|
+
//# sourceMappingURL=related.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"related.d.ts","sourceRoot":"","sources":["../../src/schemas/related.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;EAA4B,CAAC;AAE5D,wEAAwE;AACxE,eAAO,MAAM,6BAA6B;;;iBAGxC,CAAC;AAEH,iEAAiE;AACjE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;iBAmBrC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiBnC,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;iBAgBlC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG1C,CAAC;AAEH;;;;;GAKG;AACH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIhD,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAGxC,CAAC;AAEH,0DAA0D;AAC1D,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAEH,gGAAgG;AAChG,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;iBAI/C,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAGvC,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AppStoreSourceInfoSchema, ImportanceScoreSchema } from "./shared.js";
|
|
3
|
+
/**
|
|
4
|
+
* Anchor scope for related-* lookups. `org` filters the Vectorize query by
|
|
5
|
+
* the anchor's org id; `global` (default) runs unscoped.
|
|
6
|
+
*/
|
|
7
|
+
export const RelatedScopeSchema = z.enum(["org", "global"]);
|
|
8
|
+
/** Thumbnail picked from the release's first image-like media entry. */
|
|
9
|
+
export const RelatedReleaseThumbnailSchema = z.object({
|
|
10
|
+
url: z.string(),
|
|
11
|
+
alt: z.string().optional(),
|
|
12
|
+
});
|
|
13
|
+
/** Owning source rollup attached to each related-release row. */
|
|
14
|
+
export const RelatedReleaseSourceSchema = z.object({
|
|
15
|
+
id: z.string(),
|
|
16
|
+
slug: z.string(),
|
|
17
|
+
name: z.string(),
|
|
18
|
+
/** Parent product name, when the source belongs to one — preferred over the
|
|
19
|
+
* bare source/feed name for display. Null for sources with no product. */
|
|
20
|
+
productName: z.string().nullable(),
|
|
21
|
+
orgSlug: z.string().nullable(),
|
|
22
|
+
orgName: z.string().nullable(),
|
|
23
|
+
orgAvatarUrl: z.string().nullable(),
|
|
24
|
+
/**
|
|
25
|
+
* App Store platform + icon, present only for `appstore` sources (resolved
|
|
26
|
+
* server-side, same block the org/product/ticker read paths already carry).
|
|
27
|
+
* Its presence is the signal the related rail uses to render the lean
|
|
28
|
+
* mobile-app card (app icon + "iOS/macOS" cue) instead of the standard
|
|
29
|
+
* headline/thumbnail. Additive/optional for mid-deploy pin tolerance.
|
|
30
|
+
* #mobile-app-release-cards
|
|
31
|
+
*/
|
|
32
|
+
appStore: AppStoreSourceInfoSchema.optional(),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* One neighbor returned by `GET /v1/related/releases`. `score` is the
|
|
36
|
+
* Vectorize cosine similarity from the underlying query.
|
|
37
|
+
*/
|
|
38
|
+
export const RelatedReleaseItemSchema = z.object({
|
|
39
|
+
id: z.string(),
|
|
40
|
+
title: z.string(),
|
|
41
|
+
version: z.string().nullable(),
|
|
42
|
+
url: z.string().nullable(),
|
|
43
|
+
publishedAt: z.string().nullable(),
|
|
44
|
+
summary: z.string(),
|
|
45
|
+
titleGenerated: z.string().nullable(),
|
|
46
|
+
titleShort: z.string().nullable(),
|
|
47
|
+
/**
|
|
48
|
+
* AI-scored importance 1–5 (5=landmark, 1=housekeeping). Null when
|
|
49
|
+
* unscored; optional for older servers / mid-deploy pin tolerance.
|
|
50
|
+
*/
|
|
51
|
+
importance: ImportanceScoreSchema,
|
|
52
|
+
thumbnail: RelatedReleaseThumbnailSchema.nullable(),
|
|
53
|
+
score: z.number(),
|
|
54
|
+
source: RelatedReleaseSourceSchema,
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* One neighbor returned by `GET /v1/related/sources`. Carries enough
|
|
58
|
+
* source + org + recent-release stats for the rail card to render without
|
|
59
|
+
* a follow-up request.
|
|
60
|
+
*/
|
|
61
|
+
export const RelatedSourceItemSchema = z.object({
|
|
62
|
+
id: z.string(),
|
|
63
|
+
slug: z.string(),
|
|
64
|
+
name: z.string(),
|
|
65
|
+
type: z.string(),
|
|
66
|
+
url: z.string().nullable(),
|
|
67
|
+
score: z.number(),
|
|
68
|
+
orgSlug: z.string().nullable(),
|
|
69
|
+
orgName: z.string().nullable(),
|
|
70
|
+
orgAvatarUrl: z.string().nullable(),
|
|
71
|
+
releaseCount: z.number().int().min(0),
|
|
72
|
+
latestDate: z.string().nullable(),
|
|
73
|
+
latestTitle: z.string().nullable(),
|
|
74
|
+
latestVersion: z.string().nullable(),
|
|
75
|
+
/** Total releases published in the last 30 days (includes the latest). */
|
|
76
|
+
recentCount: z.number().int().min(0),
|
|
77
|
+
});
|
|
78
|
+
/**
|
|
79
|
+
* Successful response from `GET /v1/related/releases`. The handler returns
|
|
80
|
+
* `{scope, items}` when Vectorize is reachable and the anchor has a vector.
|
|
81
|
+
*/
|
|
82
|
+
export const RelatedReleasesOkResponseSchema = z.object({
|
|
83
|
+
scope: RelatedScopeSchema,
|
|
84
|
+
items: z.array(RelatedReleaseItemSchema),
|
|
85
|
+
});
|
|
86
|
+
/**
|
|
87
|
+
* Degraded response from `GET /v1/related/releases`. Returned (HTTP 200) when
|
|
88
|
+
* Vectorize bindings are missing, the anchor hasn't been embedded yet, or a
|
|
89
|
+
* downstream call errored. Callers render nothing in this case rather than
|
|
90
|
+
* surfacing a hard failure. `degradedReason` is human-readable, not stable.
|
|
91
|
+
*/
|
|
92
|
+
export const RelatedReleasesDegradedResponseSchema = z.object({
|
|
93
|
+
degraded: z.literal(true),
|
|
94
|
+
degradedReason: z.string(),
|
|
95
|
+
items: z.array(RelatedReleaseItemSchema),
|
|
96
|
+
});
|
|
97
|
+
export const RelatedReleasesResponseSchema = z.union([
|
|
98
|
+
RelatedReleasesOkResponseSchema,
|
|
99
|
+
RelatedReleasesDegradedResponseSchema,
|
|
100
|
+
]);
|
|
101
|
+
/** Successful response from `GET /v1/related/sources`. */
|
|
102
|
+
export const RelatedSourcesOkResponseSchema = z.object({
|
|
103
|
+
scope: RelatedScopeSchema,
|
|
104
|
+
items: z.array(RelatedSourceItemSchema),
|
|
105
|
+
});
|
|
106
|
+
/** Degraded response from `GET /v1/related/sources`. Same semantics as the releases variant. */
|
|
107
|
+
export const RelatedSourcesDegradedResponseSchema = z.object({
|
|
108
|
+
degraded: z.literal(true),
|
|
109
|
+
degradedReason: z.string(),
|
|
110
|
+
items: z.array(RelatedSourceItemSchema),
|
|
111
|
+
});
|
|
112
|
+
export const RelatedSourcesResponseSchema = z.union([
|
|
113
|
+
RelatedSourcesOkResponseSchema,
|
|
114
|
+
RelatedSourcesDegradedResponseSchema,
|
|
115
|
+
]);
|