@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,56 +0,0 @@
1
- import { z } from "zod";
2
- import { FEEDBACK_TYPES, FEEDBACK_STATUSES } from "@buildinternet/releases-core/schema";
3
-
4
- /** Feedback category — mirrors `FEEDBACK_TYPES` in `@buildinternet/releases-core/schema`. */
5
- export const FeedbackTypeSchema = z.enum(FEEDBACK_TYPES);
6
-
7
- /** Triage lifecycle — mirrors `FEEDBACK_STATUSES` in `@buildinternet/releases-core/schema`. */
8
- export const FeedbackStatusSchema = z.enum(FEEDBACK_STATUSES);
9
-
10
- /**
11
- * One submitted feedback row, as returned by `GET /v1/admin/feedback` and by
12
- * the triage write-path (`PATCH /v1/feedback/:id` echoes the updated row).
13
- * `archived` soft-removes the row from the default admin read view and is
14
- * orthogonal to triage `status` — a row can be `closed` and visible, or `new`
15
- * and archived. `createdAt` is epoch milliseconds.
16
- */
17
- export const FeedbackItemSchema = z.object({
18
- id: z.string(),
19
- createdAt: z.number(),
20
- message: z.string(),
21
- contact: z.string().nullable(),
22
- type: FeedbackTypeSchema,
23
- status: FeedbackStatusSchema,
24
- archived: z.boolean(),
25
- cliVersion: z.string().nullable(),
26
- clientKind: z.string(),
27
- anonId: z.string().nullable(),
28
- os: z.string().nullable(),
29
- arch: z.string().nullable(),
30
- runtime: z.string().nullable(),
31
- surface: z.string(),
32
- });
33
-
34
- /**
35
- * `GET /v1/admin/feedback` — cursor-paginated, newest-first. Archived rows are
36
- * hidden unless the request passes `?includeArchived=true`.
37
- */
38
- export const FeedbackListResponseSchema = z.object({
39
- items: z.array(FeedbackItemSchema),
40
- nextCursor: z.string().nullable(),
41
- });
42
-
43
- /**
44
- * `PATCH /v1/feedback/:id` body — partial triage update. At least one field
45
- * must be present; the response echoes the updated `FeedbackItem`.
46
- */
47
- export const FeedbackUpdateBodySchema = z.object({
48
- status: FeedbackStatusSchema.optional(),
49
- archived: z.boolean().optional(),
50
- });
51
-
52
- /** `DELETE /v1/feedback/:id` response — hard delete of a single row. */
53
- export const FeedbackDeleteResponseSchema = z.object({
54
- deleted: z.literal(true),
55
- id: z.string(),
56
- });
@@ -1,226 +0,0 @@
1
- import { z } from "zod";
2
-
3
- /**
4
- * Public wire contract for the self-serve listing lane (#1947 phase 2):
5
- * POST /v1/listing/validate and POST /v1/listing/activate. This projection is
6
- * deliberately independent of the internal materialization plan — it is the
7
- * stable shape web/CLI consume while internals stay free to change.
8
- */
9
-
10
- export const ListingValidateBodySchema = z.strictObject({
11
- domain: z.string().min(1).max(255),
12
- });
13
- export type ListingValidateBody = z.infer<typeof ListingValidateBodySchema>;
14
-
15
- export const ListingActivateBodySchema = z.strictObject({
16
- domain: z.string().min(1).max(255),
17
- requestTracking: z.boolean().optional(),
18
- });
19
- export type ListingActivateBody = z.infer<typeof ListingActivateBodySchema>;
20
-
21
- export const ListingIssueSchema = z.strictObject({
22
- path: z.string(),
23
- message: z.string(),
24
- });
25
- export type ListingIssue = z.infer<typeof ListingIssueSchema>;
26
-
27
- /** One follow-up the owner takes after declaring `publish: "push"`. */
28
- export const ListingSetupStepSchema = z.strictObject({
29
- id: z.enum(["verify", "token", "action"]),
30
- title: z.string(),
31
- detail: z.string(),
32
- });
33
- export type ListingSetupStep = z.infer<typeof ListingSetupStepSchema>;
34
-
35
- export const ListingLocationSchema = z.strictObject({
36
- /** The declared locator value (feed URL, github ref, url, appstore id, file). */
37
- locator: z.string(),
38
- kind: z.enum(["feed", "github", "appstore", "url", "file", "push"]),
39
- classification: z.enum(["tier1-live", "tier2-paused-review", "push-setup"]),
40
- /** Plain-English "what this becomes" for the preview UI. */
41
- becomes: z.string(),
42
- /** Present when the locator is nested under a manifest product. */
43
- productName: z.string().optional(),
44
- /** Changelog file or glob. Present on `kind: "push"`. */
45
- path: z.string().optional(),
46
- /** Present on `kind: "push"`: verify ownership, mint a token, add the Action. */
47
- setupSteps: z.array(ListingSetupStepSchema).optional(),
48
- });
49
- export type ListingLocation = z.infer<typeof ListingLocationSchema>;
50
-
51
- export const ListingOrgPointerSchema = z.strictObject({
52
- slug: z.string(),
53
- name: z.string(),
54
- webUrl: z.string(),
55
- });
56
- export type ListingOrgPointer = z.infer<typeof ListingOrgPointerSchema>;
57
-
58
- export const ListingValidationResultSchema = z.strictObject({
59
- valid: z.boolean(),
60
- errors: z.array(ListingIssueSchema),
61
- domainStatus: z.enum(["unlisted", "listed", "stub"]),
62
- /** Present when domainStatus is "listed" or "stub". */
63
- org: ListingOrgPointerSchema.optional(),
64
- /** Present when valid: identity fields as they would land. */
65
- identity: z
66
- .strictObject({
67
- name: z.string(),
68
- slug: z.string(),
69
- domain: z.string(),
70
- })
71
- .optional(),
72
- products: z.array(z.strictObject({ name: z.string(), locationCount: z.number() })).optional(),
73
- locations: z.array(ListingLocationSchema),
74
- });
75
- export type ListingValidationResult = z.infer<typeof ListingValidationResultSchema>;
76
-
77
- export const ListingActivateResultSchema = z.strictObject({
78
- /** True when this call created the stub; false for the existing-stub carve-out. */
79
- activated: z.boolean(),
80
- org: z.strictObject({
81
- slug: z.string(),
82
- name: z.string(),
83
- status: z.enum(["stub", "tracked"]),
84
- webUrl: z.string(),
85
- }),
86
- trackingRequested: z.boolean(),
87
- });
88
- export type ListingActivateResult = z.infer<typeof ListingActivateResultSchema>;
89
-
90
- /**
91
- * Ownership claim flow (#1947 epic item 2): a signed-in user proves control
92
- * of a listed domain via a well-known token file OR a DNS TXT record.
93
- */
94
-
95
- export const ListingClaimBodySchema = z.strictObject({
96
- domain: z.string().min(1).max(255),
97
- });
98
- export type ListingClaimBody = z.infer<typeof ListingClaimBodySchema>;
99
-
100
- export const ListingClaimVerifyBodySchema = z.strictObject({
101
- claimId: z.string().min(1),
102
- });
103
- export type ListingClaimVerifyBody = z.infer<typeof ListingClaimVerifyBodySchema>;
104
-
105
- export const OrgClaimStatusSchema = z.enum(["pending", "verified", "expired", "revoked"]);
106
- export type OrgClaimStatus = z.infer<typeof OrgClaimStatusSchema>;
107
-
108
- export const ClaimMethodSchema = z.enum(["well-known", "dns-txt"]);
109
- export type ClaimMethod = z.infer<typeof ClaimMethodSchema>;
110
-
111
- /**
112
- * `token` + `instructions` are only present while the claim is `pending` (or
113
- * on mint) — once verified there's nothing left to prove, and an expired
114
- * claim's token is stale.
115
- */
116
- export const OrgClaimSchema = z.strictObject({
117
- id: z.string(),
118
- org: ListingOrgPointerSchema,
119
- status: OrgClaimStatusSchema,
120
- method: ClaimMethodSchema.optional(),
121
- token: z.string().optional(),
122
- createdAt: z.string(),
123
- verifiedAt: z.string().optional(),
124
- /** Set once the claim was ended by its owner or an admin (#2389). */
125
- revokedAt: z.string().optional(),
126
- expiresAt: z.string(),
127
- instructions: z
128
- .strictObject({
129
- wellKnownUrl: z.string(),
130
- dnsRecordName: z.string(),
131
- })
132
- .optional(),
133
- });
134
- export type OrgClaim = z.infer<typeof OrgClaimSchema>;
135
-
136
- export const ClaimCheckOutcomeSchema = z.enum(["ok", "mismatch", "unreachable"]);
137
- export type ClaimCheckOutcome = z.infer<typeof ClaimCheckOutcomeSchema>;
138
-
139
- export const ClaimVerifyResultSchema = z.strictObject({
140
- verified: z.boolean(),
141
- checked: z.strictObject({
142
- wellKnown: ClaimCheckOutcomeSchema,
143
- dnsTxt: ClaimCheckOutcomeSchema,
144
- }),
145
- claim: OrgClaimSchema,
146
- });
147
- export type ClaimVerifyResult = z.infer<typeof ClaimVerifyResultSchema>;
148
-
149
- export const ListingClaimsResultSchema = z.strictObject({
150
- claims: z.array(OrgClaimSchema),
151
- });
152
- export type ListingClaimsResult = z.infer<typeof ListingClaimsResultSchema>;
153
-
154
- /**
155
- * Admin view of every claim on an org (`GET /v1/orgs/:slug/claims`, #2389).
156
- * Never includes the proof token.
157
- */
158
- export const AdminOrgClaimSchema = z.strictObject({
159
- id: z.string(),
160
- userId: z.string(),
161
- status: OrgClaimStatusSchema,
162
- method: ClaimMethodSchema.nullable(),
163
- createdAt: z.string(),
164
- verifiedAt: z.string().nullable(),
165
- expiresAt: z.string(),
166
- revokedAt: z.string().nullable(),
167
- revokedBy: z.string().nullable(),
168
- revokeReason: z.string().nullable(),
169
- });
170
- export type AdminOrgClaim = z.infer<typeof AdminOrgClaimSchema>;
171
-
172
- export const ListOrgClaimsResponseSchema = z.strictObject({
173
- claims: z.array(AdminOrgClaimSchema),
174
- });
175
- export type ListOrgClaimsResponse = z.infer<typeof ListOrgClaimsResponseSchema>;
176
-
177
- /** `DELETE /v1/orgs/:slug/claims/:id` body — admins must say why. */
178
- export const RevokeOrgClaimBodySchema = z.strictObject({
179
- reason: z.string().trim().min(1).max(500),
180
- });
181
- export type RevokeOrgClaimBody = z.infer<typeof RevokeOrgClaimBodySchema>;
182
-
183
- /**
184
- * Self-serve Tier-1 promotion (#1947 epic item 3, PR B): a verified owner
185
- * promotes their claimed stub to `tracked`. Independent of the internal
186
- * materialization plan — this is the stable public projection.
187
- */
188
-
189
- export const ListingPromoteBodySchema = z.strictObject({
190
- domain: z.string().min(1).max(255),
191
- });
192
- export type ListingPromoteBody = z.infer<typeof ListingPromoteBodySchema>;
193
-
194
- export const ListingPromoteLocatorOutcomeSchema = z.enum(["live", "queued-for-review"]);
195
- export type ListingPromoteLocatorOutcome = z.infer<typeof ListingPromoteLocatorOutcomeSchema>;
196
-
197
- export const ListingPromoteLocatorSchema = z.strictObject({
198
- locator: z.string(),
199
- outcome: ListingPromoteLocatorOutcomeSchema,
200
- });
201
- export type ListingPromoteLocator = z.infer<typeof ListingPromoteLocatorSchema>;
202
-
203
- export const ListingPromoteResultSchema = z.strictObject({
204
- promoted: z.boolean(),
205
- /** Present and true only for the idempotent already-`tracked` no-op. */
206
- alreadyTracked: z.boolean().optional(),
207
- sources: z.strictObject({
208
- created: z.number(),
209
- matched: z.number(),
210
- }),
211
- locators: z.array(ListingPromoteLocatorSchema),
212
- });
213
- export type ListingPromoteResult = z.infer<typeof ListingPromoteResultSchema>;
214
-
215
- /**
216
- * Public capability flags for the listing lane. Anonymous + always reachable
217
- * (does NOT 404 when either kill switch is off) so the web UI can hide CTAs
218
- * instead of offering a button that fails with "Not found".
219
- */
220
- export const ListingCapabilitiesSchema = z.strictObject({
221
- /** `listing-self-serve-enabled` — validate / activate / claim / verify. */
222
- selfServeEnabled: z.boolean(),
223
- /** `listing-self-serve-promotion-enabled` — POST /v1/listing/promote. */
224
- promotionEnabled: z.boolean(),
225
- });
226
- export type ListingCapabilities = z.infer<typeof ListingCapabilitiesSchema>;