@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
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { OverviewPageItemSchema, OverviewCitationSchema } from "./shared.js";
|
|
3
|
-
|
|
4
3
|
/**
|
|
5
4
|
* Response shape returned by `GET /v1/orgs/:slug/overview` — the org-scoped
|
|
6
5
|
* knowledge page with inline citations, or `null` when no overview has been
|
|
7
6
|
* generated yet.
|
|
8
7
|
*/
|
|
9
8
|
export const OrgOverviewResponseSchema = OverviewPageItemSchema.extend({
|
|
10
|
-
|
|
9
|
+
citations: z.array(OverviewCitationSchema).optional(),
|
|
11
10
|
}).nullable();
|
|
12
|
-
|
|
13
11
|
/**
|
|
14
12
|
* Incoming citation row attached to `POST /v1/orgs/:slug/overview`. A source the
|
|
15
13
|
* overview drew on — just `sourceUrl` (+ optional display `title`); `releaseId`
|
|
@@ -18,13 +16,12 @@ export const OrgOverviewResponseSchema = OverviewPageItemSchema.extend({
|
|
|
18
16
|
* back-compat with older clients (#1934); they're no longer stored.
|
|
19
17
|
*/
|
|
20
18
|
export const IncomingOverviewCitationSchema = z.object({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
sourceUrl: z.string().min(1),
|
|
20
|
+
title: z.string().nullable().optional(),
|
|
21
|
+
startIndex: z.number().int().min(0).optional(),
|
|
22
|
+
endIndex: z.number().int().min(0).optional(),
|
|
23
|
+
citedText: z.string().optional(),
|
|
26
24
|
});
|
|
27
|
-
|
|
28
25
|
/**
|
|
29
26
|
* Body accepted by `POST /v1/orgs/:slug/overview` — the agent-authored
|
|
30
27
|
* markdown content, the release count it was derived from, the timestamp of
|
|
@@ -35,39 +32,35 @@ export const IncomingOverviewCitationSchema = z.object({
|
|
|
35
32
|
* cross-checks `endIndex <= content.length` since that bound is content-aware.
|
|
36
33
|
*/
|
|
37
34
|
export const RegenerateOverviewBodySchema = z.object({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
content: z.string().min(1),
|
|
36
|
+
releaseCount: z.number().int().min(0),
|
|
37
|
+
lastContributingReleaseAt: z.string().nullable().optional(),
|
|
38
|
+
citations: z.array(IncomingOverviewCitationSchema).optional(),
|
|
42
39
|
});
|
|
43
|
-
|
|
44
40
|
/** Response returned by `POST /v1/orgs/:slug/overview` on success. */
|
|
45
41
|
export const RegenerateOverviewResponseSchema = z.object({
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
ok: z.literal(true),
|
|
43
|
+
citations: z.number().int().min(0),
|
|
48
44
|
});
|
|
49
|
-
|
|
50
45
|
/**
|
|
51
46
|
* Response shape returned by `GET /v1/products/:slug/overview` — the
|
|
52
47
|
* product-scoped knowledge page, or `null` when no overview exists.
|
|
53
48
|
* Does not include inline citations (products overview does not store them).
|
|
54
49
|
*/
|
|
55
50
|
export const ProductOverviewResponseSchema = OverviewPageItemSchema.nullable();
|
|
56
|
-
|
|
57
51
|
/**
|
|
58
52
|
* Pre-flight payload returned by `GET /v1/orgs/:slug/overview/inputs?check=true`.
|
|
59
53
|
* Lets an orchestrator decide whether to dispatch a per-org sub-agent without
|
|
60
54
|
* paying for the full release-content hydration.
|
|
61
55
|
*/
|
|
62
56
|
export const OverviewInputsCheckResponseSchema = z.object({
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
orgSlug: z.string(),
|
|
58
|
+
selected: z.number().int().min(0),
|
|
59
|
+
totalAvailable: z.number().int().min(0),
|
|
60
|
+
hasExistingContent: z.boolean(),
|
|
61
|
+
wouldRegenerate: z.boolean(),
|
|
62
|
+
windowDays: z.number().int().min(1),
|
|
69
63
|
});
|
|
70
|
-
|
|
71
64
|
/**
|
|
72
65
|
* Full inputs payload returned by `GET /v1/orgs/:slug/overview/inputs` (without
|
|
73
66
|
* `?check=true`). Contains org metadata, active sources, the existing overview
|
|
@@ -78,27 +71,24 @@ export const OverviewInputsCheckResponseSchema = z.object({
|
|
|
78
71
|
* fields while still surfacing the discriminating top-level structure.
|
|
79
72
|
*/
|
|
80
73
|
export const OverviewInputsFullResponseSchema = z.object({
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}),
|
|
88
|
-
sources: z.array(
|
|
89
|
-
z.object({
|
|
90
|
-
id: z.string(),
|
|
91
|
-
slug: z.string(),
|
|
92
|
-
name: z.string(),
|
|
93
|
-
type: z.string(),
|
|
74
|
+
org: z.object({
|
|
75
|
+
id: z.string(),
|
|
76
|
+
slug: z.string(),
|
|
77
|
+
name: z.string(),
|
|
78
|
+
description: z.string().nullable(),
|
|
79
|
+
discovery: z.string(),
|
|
94
80
|
}),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
sources: z.array(z.object({
|
|
82
|
+
id: z.string(),
|
|
83
|
+
slug: z.string(),
|
|
84
|
+
name: z.string(),
|
|
85
|
+
type: z.string(),
|
|
86
|
+
})),
|
|
87
|
+
existingContent: z.string().nullable(),
|
|
88
|
+
selected: z.array(z.unknown()),
|
|
89
|
+
totalAvailable: z.number().int().min(0),
|
|
90
|
+
windowDays: z.number().int().min(1),
|
|
100
91
|
});
|
|
101
|
-
|
|
102
92
|
/**
|
|
103
93
|
* Union of the two shapes `GET /v1/orgs/:slug/overview/inputs` can return.
|
|
104
94
|
* The pre-flight (`?check=true`) variant skips content hydration; the full
|
|
@@ -106,10 +96,9 @@ export const OverviewInputsFullResponseSchema = z.object({
|
|
|
106
96
|
* entry — Zod union so OpenAPI emits one schema with the variants inlined.
|
|
107
97
|
*/
|
|
108
98
|
export const OverviewInputsResponseSchema = z.union([
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
OverviewInputsCheckResponseSchema,
|
|
100
|
+
OverviewInputsFullResponseSchema,
|
|
111
101
|
]);
|
|
112
|
-
|
|
113
102
|
/**
|
|
114
103
|
* Response returned by `GET /v1/orgs/:slug/playbook` — the playbook knowledge
|
|
115
104
|
* page (scope `"playbook"`), or `null` when no playbook exists for the org.
|
|
@@ -118,17 +107,15 @@ export const OverviewInputsResponseSchema = z.union([
|
|
|
118
107
|
* by `generatePlaybookHeader()` from `@releases/ai-internal/playbook`.
|
|
119
108
|
*/
|
|
120
109
|
export const PlaybookResponseSchema = OverviewPageItemSchema.extend({
|
|
121
|
-
|
|
122
|
-
|
|
110
|
+
scope: z.literal("playbook"),
|
|
111
|
+
notes: z.string().nullable().optional(),
|
|
123
112
|
}).nullable();
|
|
124
|
-
|
|
125
113
|
/** Body accepted by `PATCH /v1/orgs/:slug/playbook/notes`. */
|
|
126
114
|
export const UpdatePlaybookNotesBodySchema = z.object({
|
|
127
|
-
|
|
115
|
+
notes: z.string(),
|
|
128
116
|
});
|
|
129
|
-
|
|
130
117
|
/** Response returned by `PATCH /v1/orgs/:slug/playbook/notes` on success. */
|
|
131
118
|
export const UpdatePlaybookNotesResponseSchema = z.object({
|
|
132
|
-
|
|
133
|
-
|
|
119
|
+
ok: z.literal(true),
|
|
120
|
+
notes: z.string().nullable(),
|
|
134
121
|
});
|