@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.
- 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 -4
- package/src/api-types.ts +0 -2223
- 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/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 -436
- 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 -114
- 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,191 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { WEBHOOK_FORMATS, WEBHOOK_SCOPES } from "@buildinternet/releases-core/schema";
|
|
3
|
+
import { ReleaseTypeSchema } from "./shared.js";
|
|
4
|
+
/**
|
|
5
|
+
* Self-serve webhook subscriptions: user-owned (`/v1/me/webhooks`) and
|
|
6
|
+
* workspace-owned (`/v1/workspaces/:workspaceId/webhooks`). Signing secrets
|
|
7
|
+
* never appear on read paths — only once on create / rotate.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* High-level delivery posture derived from summary columns (no AE query).
|
|
11
|
+
* Mirrors `WebhookDeliveryHealth` in `@releases/core-internal/webhook-resilience`.
|
|
12
|
+
*/
|
|
13
|
+
export const WebhookDeliveryHealthSchema = z.enum([
|
|
14
|
+
"never_delivered",
|
|
15
|
+
"healthy",
|
|
16
|
+
"degraded",
|
|
17
|
+
"failing",
|
|
18
|
+
"paused",
|
|
19
|
+
"auto_paused",
|
|
20
|
+
]);
|
|
21
|
+
/** Self-serve webhook filter scope. */
|
|
22
|
+
export const UserWebhookScopeSchema = z.enum(WEBHOOK_SCOPES);
|
|
23
|
+
/** Optional per-event filter on release taxonomy type. */
|
|
24
|
+
export const UserWebhookReleaseTypeFilterSchema = ReleaseTypeSchema;
|
|
25
|
+
/** Webhook delivery output format. */
|
|
26
|
+
export const UserWebhookFormatSchema = z.enum(WEBHOOK_FORMATS);
|
|
27
|
+
/** A user-owned webhook subscription row (no signing secret). */
|
|
28
|
+
export const UserWebhookSubscriptionSchema = z.object({
|
|
29
|
+
id: z.string(),
|
|
30
|
+
userId: z.string(),
|
|
31
|
+
scope: UserWebhookScopeSchema,
|
|
32
|
+
orgId: z.string().nullable(),
|
|
33
|
+
url: z.string(),
|
|
34
|
+
sourceId: z.string().nullable(),
|
|
35
|
+
productId: z.string().nullable(),
|
|
36
|
+
releaseType: UserWebhookReleaseTypeFilterSchema.nullable(),
|
|
37
|
+
format: UserWebhookFormatSchema,
|
|
38
|
+
enabled: z.boolean(),
|
|
39
|
+
description: z.string().nullable(),
|
|
40
|
+
secretVersion: z.number().int(),
|
|
41
|
+
createdAt: z.string(),
|
|
42
|
+
lastSuccessAt: z.string().nullable(),
|
|
43
|
+
lastErrorAt: z.string().nullable(),
|
|
44
|
+
lastErrorMsg: z.string().nullable(),
|
|
45
|
+
consecutiveFailures: z.number().int(),
|
|
46
|
+
disabledReason: z.string().nullable(),
|
|
47
|
+
failureStreakStartedAt: z.string().nullable(),
|
|
48
|
+
});
|
|
49
|
+
/** Delivery health fields returned on user webhook read paths. */
|
|
50
|
+
export const UserWebhookDeliveryHealthSchema = z.object({
|
|
51
|
+
deliveryHealth: WebhookDeliveryHealthSchema,
|
|
52
|
+
deliveryHealthSummary: z.string(),
|
|
53
|
+
});
|
|
54
|
+
/** GET/PATCH /v1/me/webhooks/:id response: the row plus its delivery health. */
|
|
55
|
+
export const UserWebhookSchema = UserWebhookSubscriptionSchema.extend(UserWebhookDeliveryHealthSchema.shape);
|
|
56
|
+
/** List item returned by GET /v1/me/webhooks — includes org/source display fields. */
|
|
57
|
+
export const UserWebhookListItemSchema = UserWebhookSubscriptionSchema.omit({ userId: true })
|
|
58
|
+
.extend(UserWebhookDeliveryHealthSchema.shape)
|
|
59
|
+
.extend({
|
|
60
|
+
orgSlug: z.string().nullable(),
|
|
61
|
+
orgName: z.string().nullable(),
|
|
62
|
+
sourceSlug: z.string().nullable(),
|
|
63
|
+
sourceName: z.string().nullable(),
|
|
64
|
+
productSlug: z.string().nullable(),
|
|
65
|
+
productName: z.string().nullable(),
|
|
66
|
+
});
|
|
67
|
+
/** GET /v1/me/webhooks response. */
|
|
68
|
+
export const UserWebhookListResponseSchema = z.object({
|
|
69
|
+
subscriptions: z.array(UserWebhookListItemSchema),
|
|
70
|
+
});
|
|
71
|
+
/** Fields a create response adds to the stored row (user and workspace). */
|
|
72
|
+
const CreatedWebhookFields = {
|
|
73
|
+
...UserWebhookDeliveryHealthSchema.shape,
|
|
74
|
+
orgSlug: z.string().nullable(),
|
|
75
|
+
orgName: z.string().nullable(),
|
|
76
|
+
/** Shown once at creation; omitted for slack/discord. */
|
|
77
|
+
signingKey: z.string().optional(),
|
|
78
|
+
};
|
|
79
|
+
/** POST /v1/me/webhooks response. */
|
|
80
|
+
export const CreateUserWebhookResponseSchema = UserWebhookSubscriptionSchema.extend(CreatedWebhookFields);
|
|
81
|
+
/** POST …/webhooks/:id/rotate-secret response (user and workspace). */
|
|
82
|
+
export const RotateUserWebhookSecretResponseSchema = z.object({
|
|
83
|
+
secretVersion: z.number().int(),
|
|
84
|
+
signingKey: z.string(),
|
|
85
|
+
});
|
|
86
|
+
/** POST …/webhooks/:id/test response (user and workspace). */
|
|
87
|
+
export const TestUserWebhookResponseSchema = z.object({
|
|
88
|
+
enqueued: z.literal(true),
|
|
89
|
+
eventId: z.string(),
|
|
90
|
+
});
|
|
91
|
+
/** Workspace member role (Better Auth `member.role`, not `user.role`). */
|
|
92
|
+
export const WorkspaceMemberRoleSchema = z.enum(["owner", "admin", "member"]);
|
|
93
|
+
/** Workspace webhooks are org-scoped only; there is no workspace follows scope. */
|
|
94
|
+
const WorkspaceOwnerFields = { workspaceId: z.string(), scope: z.literal("org") };
|
|
95
|
+
/** A workspace-owned webhook subscription row (no signing secret). */
|
|
96
|
+
export const WorkspaceWebhookSubscriptionSchema = UserWebhookSubscriptionSchema.omit({
|
|
97
|
+
userId: true,
|
|
98
|
+
}).extend(WorkspaceOwnerFields);
|
|
99
|
+
/** GET/PATCH /v1/workspaces/:workspaceId/webhooks/:id response. */
|
|
100
|
+
export const WorkspaceWebhookSchema = WorkspaceWebhookSubscriptionSchema.extend(UserWebhookDeliveryHealthSchema.shape);
|
|
101
|
+
/** List item returned by GET /v1/workspaces/:workspaceId/webhooks. */
|
|
102
|
+
export const WorkspaceWebhookListItemSchema = UserWebhookListItemSchema.extend(WorkspaceOwnerFields);
|
|
103
|
+
/** GET /v1/workspaces/:workspaceId/webhooks response. */
|
|
104
|
+
export const WorkspaceWebhookListResponseSchema = z.object({
|
|
105
|
+
subscriptions: z.array(WorkspaceWebhookListItemSchema),
|
|
106
|
+
/** The caller's role in the workspace. */
|
|
107
|
+
role: WorkspaceMemberRoleSchema,
|
|
108
|
+
/** True for owners and admins: create, edit, rotate, and delete. Members can view and test. */
|
|
109
|
+
canManage: z.boolean(),
|
|
110
|
+
});
|
|
111
|
+
/** POST /v1/workspaces/:workspaceId/webhooks response. */
|
|
112
|
+
export const CreateWorkspaceWebhookResponseSchema = WorkspaceWebhookSubscriptionSchema.extend(CreatedWebhookFields);
|
|
113
|
+
/**
|
|
114
|
+
* Fields shared by user and workspace webhook create bodies. Documentation
|
|
115
|
+
* shape: the handler validates (SSRF-checks `url`, matches `format` to the
|
|
116
|
+
* URL host) and resolves the org/source/product references.
|
|
117
|
+
*/
|
|
118
|
+
const WebhookCreateCommonFields = {
|
|
119
|
+
url: z.string().max(2048).describe("Public https URL that receives deliveries."),
|
|
120
|
+
format: UserWebhookFormatSchema.optional().describe("Delivery format. Defaults to `json`."),
|
|
121
|
+
description: z.string().max(1000).optional(),
|
|
122
|
+
releaseType: UserWebhookReleaseTypeFilterSchema.optional(),
|
|
123
|
+
};
|
|
124
|
+
/** Org/source/product targeting for an org-scoped webhook (`orgId` or `orgSlug` required). */
|
|
125
|
+
const WebhookOrgTargetFields = {
|
|
126
|
+
orgId: z.string().optional(),
|
|
127
|
+
orgSlug: z.string().optional(),
|
|
128
|
+
sourceId: z.string().optional(),
|
|
129
|
+
sourceSlug: z.string().optional(),
|
|
130
|
+
productId: z.string().optional(),
|
|
131
|
+
productSlug: z.string().optional(),
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* POST /v1/me/webhooks body. `scope: "follows"` delivers releases from
|
|
135
|
+
* everything the caller follows and must not name an org/source/product;
|
|
136
|
+
* the default `"org"` scope requires `orgId` or `orgSlug`.
|
|
137
|
+
*/
|
|
138
|
+
export const CreateUserWebhookBodySchema = z.object({
|
|
139
|
+
scope: UserWebhookScopeSchema.optional(),
|
|
140
|
+
...WebhookCreateCommonFields,
|
|
141
|
+
...WebhookOrgTargetFields,
|
|
142
|
+
});
|
|
143
|
+
/** POST /v1/workspaces/:workspaceId/webhooks body — org-scoped only. */
|
|
144
|
+
export const CreateWorkspaceWebhookBodySchema = z.object({
|
|
145
|
+
scope: z.literal("org").optional(),
|
|
146
|
+
...WebhookCreateCommonFields,
|
|
147
|
+
...WebhookOrgTargetFields,
|
|
148
|
+
});
|
|
149
|
+
/**
|
|
150
|
+
* PATCH …/webhooks/:id body (user and workspace). Every field is optional,
|
|
151
|
+
* but at least one must be present. `null` on `sourceId` / `productId` /
|
|
152
|
+
* `releaseType` / `description` clears that filter; follows-scoped webhooks
|
|
153
|
+
* reject the source/product fields. Re-enabling resets the failure streak.
|
|
154
|
+
*/
|
|
155
|
+
export const UpdateWebhookBodySchema = z.object({
|
|
156
|
+
url: z.string().max(2048).optional(),
|
|
157
|
+
format: UserWebhookFormatSchema.optional(),
|
|
158
|
+
description: z.string().max(1000).nullable().optional(),
|
|
159
|
+
enabled: z.boolean().optional(),
|
|
160
|
+
disabledReason: z.string().nullable().optional(),
|
|
161
|
+
releaseType: UserWebhookReleaseTypeFilterSchema.nullable().optional(),
|
|
162
|
+
sourceId: z.string().nullable().optional(),
|
|
163
|
+
sourceSlug: z.string().optional(),
|
|
164
|
+
productId: z.string().nullable().optional(),
|
|
165
|
+
productSlug: z.string().optional(),
|
|
166
|
+
});
|
|
167
|
+
/** One Analytics Engine delivery-attempt row from GET …/webhooks/:id/deliveries. */
|
|
168
|
+
export const WebhookDeliveryRowSchema = z.object({
|
|
169
|
+
timestamp: z.string().optional(),
|
|
170
|
+
event_id: z.string().optional(),
|
|
171
|
+
error_message: z.string().nullable().optional(),
|
|
172
|
+
error_code: z.string().nullable().optional(),
|
|
173
|
+
outcome: z.string().optional(),
|
|
174
|
+
/** "json" (signed raw event) or a chat card (`slack` / `discord`). Empty on pre-format rows. */
|
|
175
|
+
format: z.union([UserWebhookFormatSchema, z.literal("")]).optional(),
|
|
176
|
+
http_status: z.number().optional(),
|
|
177
|
+
latency_ms: z.number().optional(),
|
|
178
|
+
attempt: z.number().optional(),
|
|
179
|
+
});
|
|
180
|
+
/**
|
|
181
|
+
* GET …/webhooks/:id/deliveries response: the Analytics Engine SQL result,
|
|
182
|
+
* newest first. `?failed=true` keeps only failed attempts; `?limit=` is 1-100
|
|
183
|
+
* (default 20).
|
|
184
|
+
*/
|
|
185
|
+
export const WebhookDeliveriesResponseSchema = z
|
|
186
|
+
.object({
|
|
187
|
+
data: z.array(WebhookDeliveryRowSchema),
|
|
188
|
+
rows: z.number().int().optional(),
|
|
189
|
+
meta: z.array(z.object({ name: z.string(), type: z.string() })).optional(),
|
|
190
|
+
})
|
|
191
|
+
.passthrough();
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** A domain manifest can name a concrete GitHub repository, but never `self`. */
|
|
3
|
+
export declare const ReleasesJsonDomainReleaseSchema: z.ZodObject<{
|
|
4
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
5
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
6
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
7
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
8
|
+
title: z.ZodOptional<z.ZodString>;
|
|
9
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
11
|
+
path: z.ZodOptional<z.ZodString>;
|
|
12
|
+
github: z.ZodOptional<z.ZodString>;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
/** A repo manifest additionally accepts `github: "self"`. */
|
|
15
|
+
export declare const ReleasesJsonRepoReleaseSchema: z.ZodObject<{
|
|
16
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
17
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
18
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
19
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
20
|
+
title: z.ZodOptional<z.ZodString>;
|
|
21
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
23
|
+
path: z.ZodOptional<z.ZodString>;
|
|
24
|
+
github: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"self">, z.ZodString]>>;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
/**
|
|
27
|
+
* Product declaration in a domain manifest. Taxonomy strings are deliberately
|
|
28
|
+
* lenient here; the reconciler resolves known values and ignores the rest.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ReleasesJsonProductSchema: z.ZodObject<{
|
|
31
|
+
name: z.ZodString;
|
|
32
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
33
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
34
|
+
category: z.ZodOptional<z.ZodString>;
|
|
35
|
+
description: z.ZodOptional<z.ZodString>;
|
|
36
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
37
|
+
docs: z.ZodOptional<z.ZodURL>;
|
|
38
|
+
support: z.ZodOptional<z.ZodURL>;
|
|
39
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
40
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
44
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
45
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
46
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
47
|
+
title: z.ZodOptional<z.ZodString>;
|
|
48
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
49
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
50
|
+
path: z.ZodOptional<z.ZodString>;
|
|
51
|
+
github: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strict>>>;
|
|
53
|
+
}, z.core.$strict>;
|
|
54
|
+
/** Repo-scope product binding. Slug is only a creation suggestion. */
|
|
55
|
+
export declare const ReleasesJsonRepoProductSchema: z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, z.core.$strict>;
|
|
59
|
+
/** Registry-specific extensions are forward-compatible by design. */
|
|
60
|
+
export declare const ReleasesJsonRegistriesSchema: z.ZodObject<{
|
|
61
|
+
"releases.sh": z.ZodOptional<z.ZodObject<{
|
|
62
|
+
org: z.ZodOptional<z.ZodString>;
|
|
63
|
+
product: z.ZodOptional<z.ZodString>;
|
|
64
|
+
verification: z.ZodOptional<z.ZodString>;
|
|
65
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
66
|
+
}, z.core.$catchall<z.ZodUnknown>>;
|
|
67
|
+
/** Domain-hosted variant: flat org identity plus product and release declarations. */
|
|
68
|
+
export declare const ReleasesJsonDomainSchema: z.ZodObject<{
|
|
69
|
+
$schema: z.ZodOptional<z.ZodURL>;
|
|
70
|
+
version: z.ZodLiteral<2>;
|
|
71
|
+
registries: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
"releases.sh": z.ZodOptional<z.ZodObject<{
|
|
73
|
+
org: z.ZodOptional<z.ZodString>;
|
|
74
|
+
product: z.ZodOptional<z.ZodString>;
|
|
75
|
+
verification: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
77
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
78
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
79
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
80
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
81
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
82
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
83
|
+
title: z.ZodOptional<z.ZodString>;
|
|
84
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
86
|
+
path: z.ZodOptional<z.ZodString>;
|
|
87
|
+
github: z.ZodOptional<z.ZodString>;
|
|
88
|
+
}, z.core.$strict>>>;
|
|
89
|
+
name: z.ZodOptional<z.ZodString>;
|
|
90
|
+
description: z.ZodOptional<z.ZodString>;
|
|
91
|
+
category: z.ZodOptional<z.ZodString>;
|
|
92
|
+
avatar: z.ZodOptional<z.ZodURL>;
|
|
93
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
94
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
95
|
+
products: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
98
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
99
|
+
category: z.ZodOptional<z.ZodString>;
|
|
100
|
+
description: z.ZodOptional<z.ZodString>;
|
|
101
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
102
|
+
docs: z.ZodOptional<z.ZodURL>;
|
|
103
|
+
support: z.ZodOptional<z.ZodURL>;
|
|
104
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
108
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
109
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
110
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
111
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
112
|
+
title: z.ZodOptional<z.ZodString>;
|
|
113
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
115
|
+
path: z.ZodOptional<z.ZodString>;
|
|
116
|
+
github: z.ZodOptional<z.ZodString>;
|
|
117
|
+
}, z.core.$strict>>>;
|
|
118
|
+
}, z.core.$strict>>>;
|
|
119
|
+
}, z.core.$strict>;
|
|
120
|
+
/** Repo-root variant: product binding plus repo-scoped release declarations. */
|
|
121
|
+
export declare const ReleasesJsonRepoSchema: z.ZodObject<{
|
|
122
|
+
$schema: z.ZodOptional<z.ZodURL>;
|
|
123
|
+
version: z.ZodLiteral<2>;
|
|
124
|
+
registries: z.ZodOptional<z.ZodObject<{
|
|
125
|
+
"releases.sh": z.ZodOptional<z.ZodObject<{
|
|
126
|
+
org: z.ZodOptional<z.ZodString>;
|
|
127
|
+
product: z.ZodOptional<z.ZodString>;
|
|
128
|
+
verification: z.ZodOptional<z.ZodString>;
|
|
129
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
130
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
131
|
+
product: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
name: z.ZodString;
|
|
133
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
136
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
137
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
138
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
139
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
140
|
+
title: z.ZodOptional<z.ZodString>;
|
|
141
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
143
|
+
path: z.ZodOptional<z.ZodString>;
|
|
144
|
+
github: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"self">, z.ZodString]>>;
|
|
145
|
+
}, z.core.$strict>>>;
|
|
146
|
+
}, z.core.$strict>;
|
|
147
|
+
/** Public schema accepts either hosting scope; reconcilers use the scoped schema. */
|
|
148
|
+
export declare const ReleasesJsonConfigSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
149
|
+
$schema: z.ZodOptional<z.ZodURL>;
|
|
150
|
+
version: z.ZodLiteral<2>;
|
|
151
|
+
registries: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
"releases.sh": z.ZodOptional<z.ZodObject<{
|
|
153
|
+
org: z.ZodOptional<z.ZodString>;
|
|
154
|
+
product: z.ZodOptional<z.ZodString>;
|
|
155
|
+
verification: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
157
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
158
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
159
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
160
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
161
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
162
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
163
|
+
title: z.ZodOptional<z.ZodString>;
|
|
164
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
165
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
166
|
+
path: z.ZodOptional<z.ZodString>;
|
|
167
|
+
github: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>>>;
|
|
169
|
+
name: z.ZodOptional<z.ZodString>;
|
|
170
|
+
description: z.ZodOptional<z.ZodString>;
|
|
171
|
+
category: z.ZodOptional<z.ZodString>;
|
|
172
|
+
avatar: z.ZodOptional<z.ZodURL>;
|
|
173
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
175
|
+
products: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
176
|
+
name: z.ZodString;
|
|
177
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
178
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
179
|
+
category: z.ZodOptional<z.ZodString>;
|
|
180
|
+
description: z.ZodOptional<z.ZodString>;
|
|
181
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
182
|
+
docs: z.ZodOptional<z.ZodURL>;
|
|
183
|
+
support: z.ZodOptional<z.ZodURL>;
|
|
184
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
185
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
186
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
188
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
189
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
190
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
191
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
192
|
+
title: z.ZodOptional<z.ZodString>;
|
|
193
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
194
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
195
|
+
path: z.ZodOptional<z.ZodString>;
|
|
196
|
+
github: z.ZodOptional<z.ZodString>;
|
|
197
|
+
}, z.core.$strict>>>;
|
|
198
|
+
}, z.core.$strict>>>;
|
|
199
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
200
|
+
$schema: z.ZodOptional<z.ZodURL>;
|
|
201
|
+
version: z.ZodLiteral<2>;
|
|
202
|
+
registries: z.ZodOptional<z.ZodObject<{
|
|
203
|
+
"releases.sh": z.ZodOptional<z.ZodObject<{
|
|
204
|
+
org: z.ZodOptional<z.ZodString>;
|
|
205
|
+
product: z.ZodOptional<z.ZodString>;
|
|
206
|
+
verification: z.ZodOptional<z.ZodString>;
|
|
207
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
208
|
+
}, z.core.$catchall<z.ZodUnknown>>>;
|
|
209
|
+
product: z.ZodOptional<z.ZodObject<{
|
|
210
|
+
name: z.ZodString;
|
|
211
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
212
|
+
}, z.core.$strict>>;
|
|
213
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
214
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
215
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
216
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
217
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
218
|
+
title: z.ZodOptional<z.ZodString>;
|
|
219
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
220
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
221
|
+
path: z.ZodOptional<z.ZodString>;
|
|
222
|
+
github: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"self">, z.ZodString]>>;
|
|
223
|
+
}, z.core.$strict>>>;
|
|
224
|
+
}, z.core.$strict>]>;
|
|
225
|
+
export type ReleasesJsonConfig = z.infer<typeof ReleasesJsonConfigSchema>;
|
|
226
|
+
export type ReleasesJsonDomain = z.infer<typeof ReleasesJsonDomainSchema>;
|
|
227
|
+
export type ReleasesJsonRepo = z.infer<typeof ReleasesJsonRepoSchema>;
|
|
228
|
+
export type ReleasesJsonProduct = z.infer<typeof ReleasesJsonProductSchema>;
|
|
229
|
+
export type ReleasesJsonDomainRelease = z.infer<typeof ReleasesJsonDomainReleaseSchema>;
|
|
230
|
+
export type ReleasesJsonRepoRelease = z.infer<typeof ReleasesJsonRepoReleaseSchema>;
|
|
231
|
+
/**
|
|
232
|
+
* Body for `POST /v1/orgs/stub` — curator-authored stub org (#1947). Mirrors
|
|
233
|
+
* the domain-manifest identity + product + locator shape (so a curator can hand
|
|
234
|
+
* the same declaration a manifest would carry), minus manifest-transport fields
|
|
235
|
+
* (`version`/`$schema`/`registries`) and plus the registry-identity fields a
|
|
236
|
+
* stub org needs to be resolvable (`slug`/`domain`). Locators are optional — an
|
|
237
|
+
* identity-only stub (locations TBD) is valid. `category`/taxonomy strings stay
|
|
238
|
+
* lenient; the route resolves them and ignores the rest, same as the reconciler.
|
|
239
|
+
*/
|
|
240
|
+
export declare const CreateStubOrgBodySchema: z.ZodObject<{
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
243
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
244
|
+
description: z.ZodOptional<z.ZodString>;
|
|
245
|
+
category: z.ZodOptional<z.ZodString>;
|
|
246
|
+
avatar: z.ZodOptional<z.ZodURL>;
|
|
247
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
248
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
249
|
+
products: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
250
|
+
name: z.ZodString;
|
|
251
|
+
slug: z.ZodOptional<z.ZodString>;
|
|
252
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
253
|
+
category: z.ZodOptional<z.ZodString>;
|
|
254
|
+
description: z.ZodOptional<z.ZodString>;
|
|
255
|
+
website: z.ZodOptional<z.ZodURL>;
|
|
256
|
+
docs: z.ZodOptional<z.ZodURL>;
|
|
257
|
+
support: z.ZodOptional<z.ZodURL>;
|
|
258
|
+
social: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
259
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
260
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
261
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
262
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
263
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
264
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
265
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
266
|
+
title: z.ZodOptional<z.ZodString>;
|
|
267
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
268
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
269
|
+
path: z.ZodOptional<z.ZodString>;
|
|
270
|
+
github: z.ZodOptional<z.ZodString>;
|
|
271
|
+
}, z.core.$strict>>>;
|
|
272
|
+
}, z.core.$strict>>>;
|
|
273
|
+
releases: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
274
|
+
url: z.ZodOptional<z.ZodURL>;
|
|
275
|
+
feed: z.ZodOptional<z.ZodURL>;
|
|
276
|
+
appstore: z.ZodOptional<z.ZodURL>;
|
|
277
|
+
file: z.ZodOptional<z.ZodURL>;
|
|
278
|
+
title: z.ZodOptional<z.ZodString>;
|
|
279
|
+
canonical: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
+
publish: z.ZodOptional<z.ZodLiteral<"push">>;
|
|
281
|
+
path: z.ZodOptional<z.ZodString>;
|
|
282
|
+
github: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, z.core.$strict>>>;
|
|
284
|
+
}, z.core.$strict>;
|
|
285
|
+
export type CreateStubOrgBody = z.infer<typeof CreateStubOrgBodySchema>;
|
|
286
|
+
/**
|
|
287
|
+
* Body for `POST /v1/orgs/stub-from-domain` (#1947) — the unlisted-domain path.
|
|
288
|
+
* The worker fetches https://{domain}/.well-known/releases.json and, if valid
|
|
289
|
+
* and the domain has no org yet, creates a stub org + declared locators.
|
|
290
|
+
*/
|
|
291
|
+
export declare const StubFromDomainBodySchema: z.ZodObject<{
|
|
292
|
+
domain: z.ZodString;
|
|
293
|
+
}, z.core.$strict>;
|
|
294
|
+
export type StubFromDomainBody = z.infer<typeof StubFromDomainBodySchema>;
|
|
295
|
+
/** Response shape of POST /v1/orgs/:slug/sync-well-known. */
|
|
296
|
+
export declare const SyncWellKnownResponseSchema: z.ZodObject<{
|
|
297
|
+
fetched: z.ZodBoolean;
|
|
298
|
+
applied: z.ZodBoolean;
|
|
299
|
+
skippedReason: z.ZodOptional<z.ZodString>;
|
|
300
|
+
plan: z.ZodOptional<z.ZodUnknown>;
|
|
301
|
+
}, z.core.$strip>;
|
|
302
|
+
//# sourceMappingURL=well-known.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"well-known.d.ts","sourceRoot":"","sources":["../../src/schemas/well-known.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgExB,iFAAiF;AACjF,eAAO,MAAM,+BAA+B;;;;;;;;;;kBAYzC,CAAC;AAEJ,6DAA6D;AAC7D,eAAO,MAAM,6BAA6B;;;;;;;;;;kBAcvC,CAAC;AAoBJ;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;kBAapC,CAAC;AAEH,sEAAsE;AACtE,eAAO,MAAM,6BAA6B;;;kBAGxC,CAAC;AAgBH,qEAAqE;AACrE,eAAO,MAAM,4BAA4B;;;;;;kCAIjB,CAAC;AAczB,sFAAsF;AACtF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAkBlC,CAAC;AAEJ,gFAAgF;AAChF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;kBAIjC,CAAC;AAEH,qFAAqF;AACrF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAA8D,CAAC;AAEpG,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAWlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;kBAEnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B;;;;;iBAKtC,CAAC"}
|