@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
@@ -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
- citations: z.array(OverviewCitationSchema).optional(),
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
- sourceUrl: z.string().min(1),
22
- title: z.string().nullable().optional(),
23
- startIndex: z.number().int().min(0).optional(),
24
- endIndex: z.number().int().min(0).optional(),
25
- citedText: z.string().optional(),
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
- content: z.string().min(1),
39
- releaseCount: z.number().int().min(0),
40
- lastContributingReleaseAt: z.string().nullable().optional(),
41
- citations: z.array(IncomingOverviewCitationSchema).optional(),
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
- ok: z.literal(true),
47
- citations: z.number().int().min(0),
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
- orgSlug: z.string(),
64
- selected: z.number().int().min(0),
65
- totalAvailable: z.number().int().min(0),
66
- hasExistingContent: z.boolean(),
67
- wouldRegenerate: z.boolean(),
68
- windowDays: z.number().int().min(1),
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
- org: z.object({
82
- id: z.string(),
83
- slug: z.string(),
84
- name: z.string(),
85
- description: z.string().nullable(),
86
- discovery: z.string(),
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
- existingContent: z.string().nullable(),
97
- selected: z.array(z.unknown()),
98
- totalAvailable: z.number().int().min(0),
99
- windowDays: z.number().int().min(1),
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
- OverviewInputsCheckResponseSchema,
110
- OverviewInputsFullResponseSchema,
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
- scope: z.literal("playbook"),
122
- notes: z.string().nullable().optional(),
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
- notes: z.string(),
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
- ok: z.literal(true),
133
- notes: z.string().nullable(),
119
+ ok: z.literal(true),
120
+ notes: z.string().nullable(),
134
121
  });