@buildinternet/releases-api-types 0.56.0 → 0.57.1
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/package.json +2 -2
- package/src/api-types.ts +6 -0
- package/src/schemas/listing.ts +32 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buildinternet/releases-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.1",
|
|
4
4
|
"description": "Wire protocol — request/response types for the Releases registry API. Shared by web, workers, and clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"README.md"
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@buildinternet/releases-core": "^0.
|
|
20
|
+
"@buildinternet/releases-core": "^0.34.0",
|
|
21
21
|
"zod": "^4.4.3"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
package/src/api-types.ts
CHANGED
|
@@ -408,6 +408,9 @@ export {
|
|
|
408
408
|
ClaimCheckOutcomeSchema,
|
|
409
409
|
ClaimVerifyResultSchema,
|
|
410
410
|
ListingClaimsResultSchema,
|
|
411
|
+
AdminOrgClaimSchema,
|
|
412
|
+
ListOrgClaimsResponseSchema,
|
|
413
|
+
RevokeOrgClaimBodySchema,
|
|
411
414
|
ListingPromoteBodySchema,
|
|
412
415
|
ListingPromoteLocatorOutcomeSchema,
|
|
413
416
|
ListingPromoteLocatorSchema,
|
|
@@ -427,6 +430,9 @@ export {
|
|
|
427
430
|
type ClaimCheckOutcome,
|
|
428
431
|
type ClaimVerifyResult,
|
|
429
432
|
type ListingClaimsResult,
|
|
433
|
+
type AdminOrgClaim,
|
|
434
|
+
type ListOrgClaimsResponse,
|
|
435
|
+
type RevokeOrgClaimBody,
|
|
430
436
|
type ListingPromoteBody,
|
|
431
437
|
type ListingPromoteLocatorOutcome,
|
|
432
438
|
type ListingPromoteLocator,
|
package/src/schemas/listing.ts
CHANGED
|
@@ -90,7 +90,7 @@ export const ListingClaimVerifyBodySchema = z.strictObject({
|
|
|
90
90
|
});
|
|
91
91
|
export type ListingClaimVerifyBody = z.infer<typeof ListingClaimVerifyBodySchema>;
|
|
92
92
|
|
|
93
|
-
export const OrgClaimStatusSchema = z.enum(["pending", "verified", "expired"]);
|
|
93
|
+
export const OrgClaimStatusSchema = z.enum(["pending", "verified", "expired", "revoked"]);
|
|
94
94
|
export type OrgClaimStatus = z.infer<typeof OrgClaimStatusSchema>;
|
|
95
95
|
|
|
96
96
|
export const ClaimMethodSchema = z.enum(["well-known", "dns-txt"]);
|
|
@@ -109,6 +109,8 @@ export const OrgClaimSchema = z.strictObject({
|
|
|
109
109
|
token: z.string().optional(),
|
|
110
110
|
createdAt: z.string(),
|
|
111
111
|
verifiedAt: z.string().optional(),
|
|
112
|
+
/** Set once the claim was ended by its owner or an admin (#2389). */
|
|
113
|
+
revokedAt: z.string().optional(),
|
|
112
114
|
expiresAt: z.string(),
|
|
113
115
|
instructions: z
|
|
114
116
|
.strictObject({
|
|
@@ -137,6 +139,35 @@ export const ListingClaimsResultSchema = z.strictObject({
|
|
|
137
139
|
});
|
|
138
140
|
export type ListingClaimsResult = z.infer<typeof ListingClaimsResultSchema>;
|
|
139
141
|
|
|
142
|
+
/**
|
|
143
|
+
* Admin view of every claim on an org (`GET /v1/orgs/:slug/claims`, #2389).
|
|
144
|
+
* Never includes the proof token.
|
|
145
|
+
*/
|
|
146
|
+
export const AdminOrgClaimSchema = z.strictObject({
|
|
147
|
+
id: z.string(),
|
|
148
|
+
userId: z.string(),
|
|
149
|
+
status: OrgClaimStatusSchema,
|
|
150
|
+
method: ClaimMethodSchema.nullable(),
|
|
151
|
+
createdAt: z.string(),
|
|
152
|
+
verifiedAt: z.string().nullable(),
|
|
153
|
+
expiresAt: z.string(),
|
|
154
|
+
revokedAt: z.string().nullable(),
|
|
155
|
+
revokedBy: z.string().nullable(),
|
|
156
|
+
revokeReason: z.string().nullable(),
|
|
157
|
+
});
|
|
158
|
+
export type AdminOrgClaim = z.infer<typeof AdminOrgClaimSchema>;
|
|
159
|
+
|
|
160
|
+
export const ListOrgClaimsResponseSchema = z.strictObject({
|
|
161
|
+
claims: z.array(AdminOrgClaimSchema),
|
|
162
|
+
});
|
|
163
|
+
export type ListOrgClaimsResponse = z.infer<typeof ListOrgClaimsResponseSchema>;
|
|
164
|
+
|
|
165
|
+
/** `DELETE /v1/orgs/:slug/claims/:id` body — admins must say why. */
|
|
166
|
+
export const RevokeOrgClaimBodySchema = z.strictObject({
|
|
167
|
+
reason: z.string().trim().min(1).max(500),
|
|
168
|
+
});
|
|
169
|
+
export type RevokeOrgClaimBody = z.infer<typeof RevokeOrgClaimBodySchema>;
|
|
170
|
+
|
|
140
171
|
/**
|
|
141
172
|
* Self-serve Tier-1 promotion (#1947 epic item 3, PR B): a verified owner
|
|
142
173
|
* promotes their claimed stub to `tracked`. Independent of the internal
|