@reclaimprotocol/client 0.1.1 → 0.1.3

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.
@@ -51,17 +51,17 @@ export interface paths {
51
51
  cookie?: never;
52
52
  };
53
53
  /**
54
- * Search verifications
55
- * @description Search published Reclaim verifications by domain or data point. A verification is the recipe an end-user follows to prove something about themselves (e.g. "I have N followers on Twitter"). Returns a list of matches. Call this BEFORE `create_provider` — most popular domains already have a public verification you can reuse.
56
- * Catalog page listing all verifications. Returns a paginated list of verifications the caller can see. Public verifications are visible to everyone; private verifications are only visible to org members.
54
+ * Search providers
55
+ * @description Search published Reclaim providers by domain or data point. A provider is the recipe an end-user follows to prove something about themselves (e.g. "I have N followers on Twitter"). Returns a list of matches. Call this BEFORE `create_provider` — most popular domains already have a public provider you can reuse.
56
+ * Catalog page listing all providers. Returns a paginated list of providers the caller can see. Public providers are visible to everyone; private providers are only visible to org members.
57
57
  */
58
58
  get: operations["Providers"];
59
59
  put?: never;
60
60
  /**
61
- * Create a verification
62
- * @description Create a new Reclaim verification. Use this only after `providers` returned nothing useful for the domain. The caller must be an active member of the target organization.
63
- * Creates a new verification in the specified organization. `visibility` is coerced to `PRIVATE` at creation regardless of what's sent; the author may toggle to `PUBLIC` later via `PATCH /providers/{id}`. While `PRIVATE`, versions go to the go live freely; once `PUBLIC`, non-admin versions need admin review. See `Provider.visibility`.
64
- * The server also seeds an initial `0.1.0` version on the `draft` branch in the same transaction so the verification is immediately editable. Its `initialUrl` defaults to `https://<domain>`; all other version fields fall back to their schema-declared defaults (structured verification, empty requests, empty web settings). `Provider.latestVersion` stays `null` until the draft is promoted to the live channel.
61
+ * Create a provider
62
+ * @description Create a new Reclaim provider. Use this only after `providers` returned nothing useful for the domain. The caller must be an active member of the target organization.
63
+ * Creates a new provider in the specified organization. `visibility` is coerced to `PRIVATE` at creation regardless of what's sent; the author may toggle to `PUBLIC` later via `PATCH /providers/{id}`. While `PRIVATE`, versions go to the go live freely; once `PUBLIC`, non-admin versions need admin review. See `Provider.visibility`.
64
+ * The server also seeds an initial `0.1.0` version on the `draft` branch in the same transaction so the provider is immediately editable. Its `initialUrl` defaults to `https://<domain>`; all other version fields fall back to their schema-declared defaults (a `structured` verificationType, empty requests, empty web settings). `Provider.latestVersion` stays `null` until the draft is promoted to the live channel.
65
65
  */
66
66
  post: operations["CreateProvider"];
67
67
  delete?: never;
@@ -80,7 +80,7 @@ export interface paths {
80
80
  get?: never;
81
81
  put?: never;
82
82
  /**
83
- * Suggest verification fields from a domain/URL scrape
83
+ * Suggest provider fields from a domain/URL scrape
84
84
  * @description Pre-flight for `POST /providers`. Accepts a URL or bare
85
85
  * domain, scrapes the page head with a short timeout, and
86
86
  * returns suggested values (`title`, `slug`, `iconUrl`, brand
@@ -89,7 +89,7 @@ export interface paths {
89
89
  *
90
90
  * - HTML / HTMX callers receive the step-2 form HTML
91
91
  * pre-filled with the suggestions (swapped into the
92
- * create-verification dialog body).
92
+ * create-provider dialog body).
93
93
  * - JSON / SDK / agent callers receive the same suggestions
94
94
  * as a JSON document so they can build their own UI or
95
95
  * submit the create request directly.
@@ -113,7 +113,7 @@ export interface paths {
113
113
  };
114
114
  /**
115
115
  * Suggest websites for the Discover flow
116
- * @description Website-first autocomplete that backs the Discover home page (`/`). Returns the distinct websites (one entry per domain) that have at least one verification the caller can see, ranked by relevance to `q`. Each entry carries the aggregated list of data points provable for that website. With no `q`, returns popular websites (most verifications first).
116
+ * @description Website-first autocomplete that backs the Discover home page (`/`). Returns the distinct websites (one entry per domain) that have at least one provider the caller can see, ranked by relevance to `q`. Each entry carries the aggregated list of data points provable for that website. With no `q`, returns popular websites (most providers first).
117
117
  *
118
118
  * HTML / HTMX callers receive a fragment list (swapped into the search dropdown); JSON / SDK callers receive the suggestions document.
119
119
  */
@@ -135,7 +135,7 @@ export interface paths {
135
135
  };
136
136
  /**
137
137
  * Website landing & data-point selection page
138
- * @description SEO landing page for a website, and the data-point selection step of the Discover flow. Lists every data point Reclaim can currently prove for `{domain}` (aggregated across all verifications the caller can see) so a visitor can pick what to verify and continue. Organic search traffic ("verify github username") and the in-app `/` → website-select flow converge on this single canonical URL.
138
+ * @description SEO landing page for a website, and the data-point selection step of the Discover flow. Lists every data point Reclaim can currently prove for `{domain}` (aggregated across all providers the caller can see) so a visitor can pick what to verify and continue. Organic search traffic ("verify github username") and the in-app `/` → website-select flow converge on this single canonical URL.
139
139
  *
140
140
  * HTML callers receive the full page; when `q` is present and the request is an HTMX request, only the filtered data-point list fragment is returned. JSON / SDK callers receive the website's data points as a document.
141
141
  */
@@ -177,7 +177,7 @@ export interface paths {
177
177
  };
178
178
  /**
179
179
  * Build page — providers, try, and integration guide for a selection
180
- * @description The step after data-point selection on `/site/{domain}`. Given the selected data points (plus optional pinned sources, provided values, and a resolution `mode`), shows which existing verification providers cover the selection, a member-only "Try verification" action, and a ready-to-paste integration guide. The whole selection travels in the query string so the page is server-rendered and back-navigable.
180
+ * @description The step after data-point selection on `/site/{domain}`. Given the selected data points (plus optional pinned sources, provided values, and a resolution `mode`), shows which existing providers cover the selection, a member-only "Try verification" action, and a ready-to-paste integration guide. The whole selection travels in the query string so the page is server-rendered and back-navigable.
181
181
  */
182
182
  get: operations["SiteBuild"];
183
183
  put?: never;
@@ -208,6 +208,86 @@ export interface paths {
208
208
  patch?: never;
209
209
  trace?: never;
210
210
  };
211
+ "/site/{domain}/repair": {
212
+ parameters: {
213
+ query?: never;
214
+ header?: never;
215
+ path?: never;
216
+ cookie?: never;
217
+ };
218
+ /**
219
+ * Failure-aware "Repair with an AI coding agent" wizard fragment
220
+ * @description Body of the build page's repair dialog, lazy-loaded after a sandbox Try fails so the agent prompt includes the REAL failure (which provider(s) failed + the error reason, read from the session's event log) and the resolved provider set. HTML / HTMX fragment.
221
+ */
222
+ get: operations["SiteBuildRepair"];
223
+ put?: never;
224
+ post?: never;
225
+ delete?: never;
226
+ options?: never;
227
+ head?: never;
228
+ patch?: never;
229
+ trace?: never;
230
+ };
231
+ "/site/{domain}/alternative": {
232
+ parameters: {
233
+ query?: never;
234
+ header?: never;
235
+ path?: never;
236
+ cookie?: never;
237
+ };
238
+ /**
239
+ * Re-resolve excluding a failed provider, else hand off to repair
240
+ * @description After a sandbox Try fails, reads which provider(s) failed from the session analytics and re-resolves the selection with them excluded. If the rest still cover it, responds with an `HX-Redirect` to the build page (failed providers excluded — the alternative set). Otherwise emits an `openRepair` HX-Trigger so the client opens the repair wizard.
241
+ */
242
+ get: operations["SiteBuildAlternative"];
243
+ put?: never;
244
+ post?: never;
245
+ delete?: never;
246
+ options?: never;
247
+ head?: never;
248
+ patch?: never;
249
+ trace?: never;
250
+ };
251
+ "/site/{domain}/ai-provider": {
252
+ parameters: {
253
+ query?: never;
254
+ header?: never;
255
+ path?: never;
256
+ cookie?: never;
257
+ };
258
+ get?: never;
259
+ put?: never;
260
+ /**
261
+ * Author an AI (llm) provider and go to its build screen
262
+ * @description Creates an `llm`-verification provider under the signed-in member's personal org, seeded with an extraction prompt for the selected/missing data points (and carrying the working response matches from the resolved structured providers). If `fromProviderId` is an editable draft the viewer owns, it versions THAT instead. Returns the build page's AI dialog body (the editable prompt + "Try with AI"). HTML / HTMX fragment.
263
+ */
264
+ post: operations["SiteAiProvider"];
265
+ delete?: never;
266
+ options?: never;
267
+ head?: never;
268
+ patch?: never;
269
+ trace?: never;
270
+ };
271
+ "/site/{domain}/try-ai": {
272
+ parameters: {
273
+ query?: never;
274
+ header?: never;
275
+ path?: never;
276
+ cookie?: never;
277
+ };
278
+ get?: never;
279
+ put?: never;
280
+ /**
281
+ * Mint a SANDBOX test session for an AI (llm) provider
282
+ * @description Mints a sandbox verification session for the given AI provider's draft and opens it in the verification client. An edited `prompt` in the body is saved as a new draft build first (the "edit prompt / try again" loop). Requires a signed-in member.
283
+ */
284
+ post: operations["SiteTryAi"];
285
+ delete?: never;
286
+ options?: never;
287
+ head?: never;
288
+ patch?: never;
289
+ trace?: never;
290
+ };
211
291
  "/discover/teach": {
212
292
  parameters: {
213
293
  query?: never;
@@ -217,7 +297,7 @@ export interface paths {
217
297
  };
218
298
  /**
219
299
  * “Teach our agent” instructions for a missing website / data point
220
- * @description Returns the "Teach our agent" panel shown when a website or data point a user wants does not exist yet: steps to install the Reclaim MCP server plus a ready-to-copy prompt, templated with the requested `domain` and (optionally) `dataPoint`, that instructs an agent to author the missing verification. HTML / HTMX only (a dialog fragment).
300
+ * @description Returns the "Teach our agent" panel shown when a website or data point a user wants does not exist yet: steps to install the Reclaim MCP server plus a ready-to-copy prompt, templated with the requested `domain` and (optionally) `dataPoint`, that instructs an agent to author the missing provider. HTML / HTMX only (a dialog fragment).
221
301
  */
222
302
  get: operations["DiscoverTeachAgent"];
223
303
  put?: never;
@@ -236,8 +316,10 @@ export interface paths {
236
316
  cookie?: never;
237
317
  };
238
318
  /**
239
- * Resolve existing providers covering selected data points
240
- * @description The "resolve" step behind the Discover CTAs. Given a website and the data points the user picked, returns the existing verifications on that domain whose data points COVER the whole selection (smallest / most specific first), so a caller can reuse one instead of building a new verification. When nothing covers the selection, `needsCreation` is `true` — synthesising a new provider by stitching is a later stage. JSON only.
319
+ * Resolve a website + data points to providers
320
+ * @description Provider resolution: given a website and the data points the user wants their users to prove, return the smallest set of existing providers whose data points COVER the selection (greedy combine), the `requiredContext` inputs the consumer must supply, and any `uncovered` points no provider exposes yet (`needsCreation` is true then — author a provider with the agent tools). When the chosen providers can be fused into one (same start page, no clashing page scripts) `merge.mergeable` is true.
321
+ *
322
+ * Agent flow: pick a website (`GET /discover/data-points` lists what's verifiable there), confirm the data points with the user, call this to get the `providers` + `requiredContext`, collect those context values from the user, then `POST /verifications/sessions` with `providers` (pass every id) and `context` to mint a verification.
241
323
  */
242
324
  get: operations["DiscoverResolve"];
243
325
  put?: never;
@@ -248,6 +330,26 @@ export interface paths {
248
330
  patch?: never;
249
331
  trace?: never;
250
332
  };
333
+ "/discover/data-points": {
334
+ parameters: {
335
+ query?: never;
336
+ header?: never;
337
+ path?: never;
338
+ cookie?: never;
339
+ };
340
+ /**
341
+ * List the verifiable data points on a website
342
+ * @description The data points existing providers can prove on a website — the menu to pick from before `GET /discover/resolve`. Optionally filter by `q`.
343
+ */
344
+ get: operations["DiscoverDataPoints"];
345
+ put?: never;
346
+ post?: never;
347
+ delete?: never;
348
+ options?: never;
349
+ head?: never;
350
+ patch?: never;
351
+ trace?: never;
352
+ };
251
353
  "/providers/{providerId}/preview.png": {
252
354
  parameters: {
253
355
  query?: never;
@@ -256,8 +358,8 @@ export interface paths {
256
358
  cookie?: never;
257
359
  };
258
360
  /**
259
- * Get the verification's OG preview image
260
- * @description Returns the 1200x630 PNG used in `<meta property="og:image">` for this verification (`Provider.previewImageUrl` points at this route). Rendered server-side on first read, then cached by the standard HTTP cache. The URL is keyed off the verification's preview ETag so it changes whenever the image-affecting fields change (title, iconUrl, effective primaryDataPoint — see `Provider.previewImageUrl`).
361
+ * Get the provider's OG preview image
362
+ * @description Returns the 1200x630 PNG used in `<meta property="og:image">` for this provider (`Provider.previewImageUrl` points at this route). Rendered server-side on first read, then cached by the standard HTTP cache. The URL is keyed off the provider's preview ETag so it changes whenever the image-affecting fields change (title, iconUrl, effective primaryDataPoint — see `Provider.previewImageUrl`).
261
363
  */
262
364
  get: operations["ProviderPreviewImage"];
263
365
  put?: never;
@@ -316,8 +418,8 @@ export interface paths {
316
418
  cookie?: never;
317
419
  };
318
420
  /**
319
- * All verifications (admin-only)
320
- * @description Admin only. Lists all verifications across all organizations. Supports filtering by visibility, status, and free-text search on title/domain/slug.
421
+ * All providers (admin-only)
422
+ * @description Admin only. Lists all providers across all organizations. Supports filtering by visibility, status, and free-text search on title/domain/slug.
321
423
  */
322
424
  get: operations["AdminProviders"];
323
425
  put?: never;
@@ -452,8 +554,8 @@ export interface paths {
452
554
  get?: never;
453
555
  put?: never;
454
556
  /**
455
- * Transfer a verification to a different workspace
456
- * @description Admin-only. Moves the verification's `orgId` to the supplied workspace; preserves slug, versions, members. SQL function `builder.transfer_provider` enforces the admin gate and target existence atomically.
557
+ * Transfer a provider to a different workspace
558
+ * @description Admin-only. Moves the provider's `orgId` to the supplied workspace; preserves slug, versions, members. SQL function `builder.transfer_provider` enforces the admin gate and target existence atomically.
457
559
  */
458
560
  post: operations["TransferProvider"];
459
561
  delete?: never;
@@ -1116,16 +1218,16 @@ export interface paths {
1116
1218
  cookie?: never;
1117
1219
  };
1118
1220
  /**
1119
- * Get a verification
1120
- * @description Fetch a single Reclaim verification by id. Returns every field needed
1221
+ * Get a provider
1222
+ * @description Fetch a single Reclaim provider by id. Returns every field needed
1121
1223
  * to integrate it into a flow: domain, the live version (initialUrl + requests),
1122
1224
  * and the data points it can prove. Use `providers` first if you only
1123
1225
  * have a query string.
1124
1226
  *
1125
- * Returns the verification record.
1227
+ * Returns the provider record.
1126
1228
  *
1127
1229
  * **Canonical URL.** For SEO and stable sharing, the canonical
1128
- * HTML URL for a verification is `/providers/{providerId}/{slug}`
1230
+ * HTML URL for a provider is `/providers/{providerId}/{slug}`
1129
1231
  * (see `GetProviderBySlug`). HTML callers (`Accept: text/html`)
1130
1232
  * that hit this route — which omits the slug — receive a `301`
1131
1233
  * redirect to the slugged URL. JSON callers
@@ -1136,16 +1238,16 @@ export interface paths {
1136
1238
  put?: never;
1137
1239
  post?: never;
1138
1240
  /**
1139
- * Delete a verification
1140
- * @description Owner of the verification's organization only. Soft-archives the verification (sets `status` to `ARCHIVED`) so historical references remain resolvable. Supports optimistic concurrency via `If-Match`.
1241
+ * Delete a provider
1242
+ * @description Owner of the provider's organization only. Soft-archives the provider (sets `status` to `ARCHIVED`) so historical references remain resolvable. Supports optimistic concurrency via `If-Match`.
1141
1243
  */
1142
1244
  delete: operations["DeleteProvider"];
1143
1245
  options?: never;
1144
1246
  head?: never;
1145
1247
  /**
1146
- * Update a verification
1147
- * @description Update a Reclaim verification's metadata. Partial PATCH — pass only fields you want to change. The caller must be an active member of the owning organization. To change the verification's recipe (initialUrl, requests, …) cut a new version via the dashboard. Use `seo` to control how the verification appears in search results and social shares; omit a subfield to keep the server default.
1148
- * Caller must be a member of the verification's owning organization. `id`, `orgId`, and `slug` are immutable. Supports optimistic concurrency via `If-Match`.
1248
+ * Update a provider
1249
+ * @description Update a Reclaim provider's metadata. Partial PATCH — pass only fields you want to change. The caller must be an active member of the owning organization. To change the provider's recipe (initialUrl, requests, …) cut a new version via the dashboard. Use `seo` to control how the provider appears in search results and social shares; omit a subfield to keep the server default.
1250
+ * Caller must be a member of the provider's owning organization. `id`, `orgId`, and `slug` are immutable. Supports optimistic concurrency via `If-Match`.
1149
1251
  */
1150
1252
  patch: operations["UpdateProvider"];
1151
1253
  trace?: never;
@@ -1158,14 +1260,14 @@ export interface paths {
1158
1260
  cookie?: never;
1159
1261
  };
1160
1262
  /**
1161
- * Get a verification (canonical slugged URL)
1162
- * @description Canonical HTML URL for a verification. The slug in the path is
1263
+ * Get a provider (canonical slugged URL)
1264
+ * @description Canonical HTML URL for a provider. The slug in the path is
1163
1265
  * primarily an SEO and link-readability affordance — the
1164
- * verification is resolved by `providerId`.
1266
+ * provider is resolved by `providerId`.
1165
1267
  *
1166
- * - If `slug` matches the verification's current slug, returns the
1268
+ * - If `slug` matches the provider's current slug, returns the
1167
1269
  * resource (HTML or JSON per `Accept`).
1168
- * - If `slug` does not match (e.g. the verification was renamed since
1270
+ * - If `slug` does not match (e.g. the provider was renamed since
1169
1271
  * the URL was minted), HTML callers receive a `301` redirect
1170
1272
  * to this same route with the *current* slug. JSON callers
1171
1273
  * receive the resource directly with `200` regardless of slug
@@ -1192,22 +1294,22 @@ export interface paths {
1192
1294
  cookie?: never;
1193
1295
  };
1194
1296
  /**
1195
- * List a verification's versions
1196
- * @description Lists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the verification's owning organization.
1297
+ * List a provider's versions
1298
+ * @description Lists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the provider's owning organization.
1197
1299
  */
1198
1300
  get: operations["ListProviderVersions"];
1199
1301
  put?: never;
1200
1302
  /**
1201
- * Create a new verification version
1202
- * @description Creates a new version of the verification. The starting branch
1203
- * depends on the verification's `visibility` and the caller's role:
1303
+ * Create a new provider version
1304
+ * @description Creates a new version of the provider. The starting branch
1305
+ * depends on the provider's `visibility` and the caller's role:
1204
1306
  *
1205
- * - `PRIVATE` verification (any caller): the live channel (no review).
1307
+ * - `PRIVATE` provider (any caller): the live channel (no review).
1206
1308
  *
1207
- * - `PUBLIC` verification, admin caller (Reclaim staff): the live channel
1309
+ * - `PUBLIC` provider, admin caller (Reclaim staff): the live channel
1208
1310
  * (no review).
1209
1311
  *
1210
- * - `PUBLIC` verification, non-admin caller: `draft` (or `ai` if
1312
+ * - `PUBLIC` provider, non-admin caller: `draft` (or `ai` if
1211
1313
  * authored by the AI assistant). Must pass review (see
1212
1314
  * `POST /providers/{id}/versions/{version}/review`) before
1213
1315
  * reaching the live channel.
@@ -1226,20 +1328,20 @@ export interface paths {
1226
1328
  path?: never;
1227
1329
  cookie?: never;
1228
1330
  };
1229
- /** Get a specific verification version */
1331
+ /** Get a specific provider version */
1230
1332
  get: operations["GetProviderVersion"];
1231
1333
  put?: never;
1232
1334
  post?: never;
1233
1335
  /**
1234
- * Delete a verification version
1235
- * @description Soft-archives a version on the `draft`, `ai`, or `rejected` branch — sets `status` to `ARCHIVED` so history is preserved. Trunk (live) and `in_review` versions cannot be archived this way; archive the parent verification instead. Supports optimistic concurrency via `If-Match`.
1336
+ * Delete a provider version
1337
+ * @description Soft-archives a version on the `draft`, `ai`, or `rejected` branch — sets `status` to `ARCHIVED` so history is preserved. Trunk (live) and `in_review` versions cannot be archived this way; archive the parent provider instead. Supports optimistic concurrency via `If-Match`.
1236
1338
  */
1237
1339
  delete: operations["DeleteProviderVersion"];
1238
1340
  options?: never;
1239
1341
  head?: never;
1240
1342
  /**
1241
- * Update a verification version
1242
- * @description Mutable only while the version is on the `draft` or `rejected` branch. Versions on `in_review` or the live channel reject all writes here. Caller must be a member of the verification's owning organization. Supports optimistic concurrency via `If-Match`.
1343
+ * Update a provider version
1344
+ * @description Mutable only while the version is on the `draft` or `rejected` branch. Versions on `in_review` or the live channel reject all writes here. Caller must be a member of the provider's owning organization. Supports optimistic concurrency via `If-Match`.
1243
1345
  */
1244
1346
  patch: operations["UpdateProviderVersion"];
1245
1347
  trace?: never;
@@ -1254,8 +1356,8 @@ export interface paths {
1254
1356
  get?: never;
1255
1357
  put?: never;
1256
1358
  /**
1257
- * Submit a verification version for review
1258
- * @description Submits a verification version (currently on the `draft` or `rejected` branch) for admin review. On success the version's branch transitions to `in_review`. Callable by any authenticated member of the verification's owning org. Meaningful only on `PUBLIC` verifications — on `PRIVATE` verifications new versions go to the live channel directly and never need review.
1359
+ * Submit a provider version for review
1360
+ * @description Submits a provider version (currently on the `draft` or `rejected` branch) for admin review. On success the version's branch transitions to `in_review`. Callable by any authenticated member of the provider's owning org. Meaningful only on `PUBLIC` providers — on `PRIVATE` providers new versions go to the live channel directly and never need review.
1259
1361
  */
1260
1362
  post: operations["SubmitProviderVersionForReview"];
1261
1363
  delete?: never;
@@ -1274,8 +1376,8 @@ export interface paths {
1274
1376
  get?: never;
1275
1377
  put?: never;
1276
1378
  /**
1277
- * Record a decision on a verification version review
1278
- * @description Admin only (Reclaim staff). Approves or rejects a verification version currently on the `in_review` branch. `APPROVED` clears the branch tag and promotes the version to the live channel; `REJECTED` moves it to the `rejected` branch where the author can address feedback and resubmit. A rejected version stays rejected — the author either fixes and resubmits, or abandons it.
1379
+ * Record a decision on a provider version review
1380
+ * @description Admin only (Reclaim staff). Approves or rejects a provider version currently on the `in_review` branch. `APPROVED` clears the branch tag and promotes the version to the live channel; `REJECTED` moves it to the `rejected` branch where the author can address feedback and resubmit. A rejected version stays rejected — the author either fixes and resubmits, or abandons it.
1279
1381
  * Until RBAC is designed, "admin" is detected via the user's email domain (`@reclaimprotocol.org`). Non-admin callers receive a 403.
1280
1382
  */
1281
1383
  post: operations["DecideProviderVersionReview"];
@@ -1296,7 +1398,7 @@ export interface paths {
1296
1398
  put?: never;
1297
1399
  /**
1298
1400
  * Publish a draft version directly (PRIVATE providers only)
1299
- * @description Publishes a verification version on the `draft` branch directly to the live channel (trunk). Only allowed for PRIVATE providers — PUBLIC providers must use the review flow (`POST .../review` → admin decision). On success the version's branch transitions from `draft` to `null` (trunk/live).
1401
+ * @description Publishes a provider version on the `draft` branch directly to the live channel (trunk). Only allowed for PRIVATE providers — PUBLIC providers must use the review flow (`POST .../review` → admin decision). On success the version's branch transitions from `draft` to `null` (trunk/live).
1300
1402
  */
1301
1403
  post: operations["PublishProviderVersion"];
1302
1404
  delete?: never;
@@ -2428,7 +2530,7 @@ export interface components {
2428
2530
  primaryDataPoint?: string;
2429
2531
  dataPoints: string[];
2430
2532
  };
2431
- /** @description One website (distinct domain) in the Discover search results. Aggregates, across every verification the caller can see on that domain, the brand display fields and the union of provable data points. */
2533
+ /** @description One website (distinct domain) in the Discover search results. Aggregates, across every provider the caller can see on that domain, the brand display fields and the union of provable data points. */
2432
2534
  WebsiteSuggestion: {
2433
2535
  /**
2434
2536
  * Format: hostname
@@ -2444,7 +2546,7 @@ export interface components {
2444
2546
  iconUrl?: string;
2445
2547
  /** @description Deduplicated names of every data point provable for this website. */
2446
2548
  dataPoints: string[];
2447
- /** @description Number of verifications backing this website that the caller can see. */
2549
+ /** @description Number of providers backing this website that the caller can see. */
2448
2550
  providerCount: number;
2449
2551
  };
2450
2552
  /** @description Body for `POST /site/{domain}/try`. Only the verification `context` (values for the resolved providers' `requiredContext` inputs). The selection (dataPoints / mode / pins) travels in the query string. */
@@ -2454,15 +2556,20 @@ export interface components {
2454
2556
  [key: string]: string;
2455
2557
  };
2456
2558
  };
2457
- /** @description A single data point selectable on the `/site/{domain}` page, with how many visible verifications expose it and one example verification slug. */
2559
+ /** @description Body for `POST /site/{domain}/try-ai`. An optional edited extraction prompt, saved as a new draft build before the sandbox session is minted. */
2560
+ SiteTryAiBody: {
2561
+ /** @description The edited extraction prompt for the AI provider. */
2562
+ prompt?: string;
2563
+ };
2564
+ /** @description A single data point selectable on the `/site/{domain}` page, with how many visible providers expose it and one example provider slug. */
2458
2565
  DataPointItem: {
2459
2566
  /** @description Data-point name (e.g. `username`, `followers_count`). */
2460
2567
  name: string;
2461
2568
  /** @description Human description of the data point, taken from the response match that declares it. Absent when no match supplies one. */
2462
2569
  description?: string;
2463
- /** @description Number of visible verifications on the domain that expose this data point. */
2570
+ /** @description Number of visible providers on the domain that expose this data point. */
2464
2571
  providerCount: number;
2465
- /** @description Slug of one verification that exposes this data point. */
2572
+ /** @description Slug of one provider that exposes this data point. */
2466
2573
  exampleProviderSlug?: string;
2467
2574
  };
2468
2575
  InterceptorOptions: {
@@ -2635,9 +2742,9 @@ export interface components {
2635
2742
  /** @default [] */
2636
2743
  allowedJsRequests: components["schemas"]["RequestSelectionTemplate"][];
2637
2744
  /** @default structured */
2638
- readonly verificationType: components["schemas"]["VerificationType"];
2745
+ verificationType: components["schemas"]["VerificationType"];
2639
2746
  /** @description The prompt used for LLM verification (only when verificationType is "llm"). */
2640
- readonly prompt?: string;
2747
+ prompt?: string;
2641
2748
  webSettings: components["schemas"]["ProviderWebSettings"];
2642
2749
  requiredContext?: components["schemas"]["ProviderRequiredContext"];
2643
2750
  };
@@ -2729,7 +2836,7 @@ export interface components {
2729
2836
  };
2730
2837
  /** @description `title` is optional — when omitted the dashboard renders `seoSuggestions.title` (server-derived from the scrape result or `derive_brand_name(domain)`). */
2731
2838
  CreateProviderRequest: {
2732
- /** @description uuid identifier of the organization that will own the verification. */
2839
+ /** @description uuid identifier of the organization that will own the provider. */
2733
2840
  orgId: components["schemas"]["OrgID"];
2734
2841
  /**
2735
2842
  * Format: hostname
@@ -2773,8 +2880,12 @@ export interface components {
2773
2880
  /** @description Author SEO fields. Send `null` for a subfield to clear that override and let `seoSuggestions` win again. */
2774
2881
  seo?: components["schemas"]["ProviderSeo"];
2775
2882
  };
2776
- /** @description Body for creating a new version of a provider. Every new version starts on the `draft` branch — see `CreateProviderVersion`. The request body never sets `branch` directly; going live is a separate, explicit step (publish for PRIVATE, submit-for-review → approve for PUBLIC). The version's `verificationType` is always `structured` and is not settable here; a `prompt` field is reserved for a future AI authoring flow and is also not accepted on this surface. */
2883
+ /** @description Body for creating a new version of a provider. Every new version starts on the `draft` branch — see `CreateProviderVersion`. The request body never sets `branch` directly; going live is a separate, explicit step (publish for PRIVATE, submit-for-review → approve for PUBLIC). `verificationType` defaults to `structured`; pass `llm` with a `prompt` to author an AI-verification provider. */
2777
2884
  CreateProviderVersionRequest: {
2885
+ /** @description Defaults to `structured` server-side when omitted; pass `llm` (with a `prompt`) to author an AI-verification provider. */
2886
+ verificationType?: components["schemas"]["VerificationType"];
2887
+ /** @description Extraction prompt, used (and required) when `verificationType` is `llm`. */
2888
+ prompt?: string;
2778
2889
  /**
2779
2890
  * @description The version of this Provider upon creation. Clients typically omit this and let the dashboard's bump-suggestion compute it. When omitted, defaults to `0.1.0` for the very first version; otherwise the caller is expected to pass a value higher than the latest existing version.
2780
2891
  * @default {
@@ -2795,10 +2906,13 @@ export interface components {
2795
2906
  /** @description Free-form change note recorded on `createMetadata`. */
2796
2907
  notes?: string;
2797
2908
  };
2798
- /** @description Partial update of a provider version. Mutable only while the version is on the `draft` or `rejected` branch; versions on `in_review` or the live channel reject all writes here. The semver does not change on update — `build_number` increments instead, giving callers a monotonic revision counter without touching the (major, minor, patch) PK. `verificationType` / `prompt` are not accepted; see `ProviderVersion` for why. */
2909
+ /** @description Partial update of a provider version. Mutable only while the version is on the `draft` or `rejected` branch; versions on `in_review` or the live channel reject all writes here. The semver does not change on update — `build_number` increments instead, giving callers a monotonic revision counter without touching the (major, minor, patch) PK. `verificationType` and `prompt` may be updated; omit either to carry the prior build's value forward. */
2799
2910
  UpdateProviderVersionRequest: {
2800
2911
  /** Format: uri */
2801
2912
  initialUrl?: string;
2913
+ verificationType?: components["schemas"]["VerificationType"];
2914
+ /** @description Extraction prompt, used when `verificationType` is `llm`. */
2915
+ prompt?: string;
2802
2916
  requests?: components["schemas"]["RequestSelection"][];
2803
2917
  allowedJsRequests?: components["schemas"]["RequestSelectionTemplate"][];
2804
2918
  webSettings?: components["schemas"]["ProviderWebSettings"];
@@ -3472,17 +3586,23 @@ export interface operations {
3472
3586
  };
3473
3587
  SiteBuild: {
3474
3588
  parameters: {
3475
- query: {
3476
- /** @description Selected data-point names. Repeat to pass several. */
3477
- dataPoints: string[];
3478
- /** @description `combine` (default) minimizes to the fewest providers (set-cover); `list` uses one provider per data point. */
3479
- mode?: "list" | "combine";
3589
+ query?: {
3590
+ /** @description Selected data-point names. Repeat to pass several. Optional only so the "Build it with AI" entry can open the build page with just a missing `dataPoint`; the normal flow always passes ≥1. */
3591
+ dataPoints?: string[];
3592
+ /** @description When set, auto-opens the "Try with AI" dialog on load (the "Build it with AI" entry from the explore page). */
3593
+ ai?: string;
3594
+ /** @description A specific missing data point to seed the AI prompt with. */
3595
+ dataPoint?: string;
3596
+ /** @description `combine` (default) minimizes to the fewest providers (set-cover); `ai` is a forward-compat alias that currently resolves like combine. */
3597
+ mode?: "combine" | "ai";
3480
3598
  /** @description Source pins: `pins[<dataPoint>]=id,id`. Maps each data-point name to a comma-joined list of preferred providerIds. Omit for Auto. */
3481
3599
  pins?: {
3482
3600
  [key: string]: string;
3483
3601
  };
3484
3602
  /** @description Data-point names the consumer opts to SUPPLY themselves (as verification `context`) instead of having a provider prove — shrinks the provider set. Repeat to pass several. Only names that are a provider input are honoured. Subset of `dataPoints`. */
3485
3603
  provided?: string[];
3604
+ /** @description ProviderIds to EXCLUDE from resolution (set after a sandbox Try fails, so a different provider / merge is picked). Repeat to pass several. */
3605
+ exclude?: components["schemas"]["ProviderID"][];
3486
3606
  };
3487
3607
  header?: never;
3488
3608
  path: {
@@ -3512,13 +3632,15 @@ export interface operations {
3512
3632
  /** @description Selected data-point names. Repeat to pass several. */
3513
3633
  dataPoints: string[];
3514
3634
  /** @description Resolution mode (`combine` default | `list`). */
3515
- mode?: "list" | "combine";
3635
+ mode?: "combine" | "ai";
3516
3636
  /** @description Source pins: `pins[<dataPoint>]=id,id`. Maps each data-point name to a comma-joined list of preferred providerIds. */
3517
3637
  pins?: {
3518
3638
  [key: string]: string;
3519
3639
  };
3520
3640
  /** @description Data-point names the consumer supplies themselves (as `context`) instead of proving. Repeat to pass several. Subset of `dataPoints`. */
3521
3641
  provided?: string[];
3642
+ /** @description ProviderIds to exclude from resolution. Repeat to pass several. */
3643
+ exclude?: components["schemas"]["ProviderID"][];
3522
3644
  };
3523
3645
  header?: never;
3524
3646
  path: {
@@ -3566,6 +3688,157 @@ export interface operations {
3566
3688
  default: components["responses"]["ProblemResponse"];
3567
3689
  };
3568
3690
  };
3691
+ SiteBuildRepair: {
3692
+ parameters: {
3693
+ query: {
3694
+ /** @description The failing sandbox session whose analytics seed the prompt. */
3695
+ sessionId: components["schemas"]["SessionID"];
3696
+ dataPoints?: string[];
3697
+ mode?: "combine" | "ai";
3698
+ provided?: string[];
3699
+ pins?: {
3700
+ [key: string]: string;
3701
+ };
3702
+ exclude?: components["schemas"]["ProviderID"][];
3703
+ };
3704
+ header?: never;
3705
+ path: {
3706
+ domain: string;
3707
+ };
3708
+ cookie?: never;
3709
+ };
3710
+ requestBody?: never;
3711
+ responses: {
3712
+ /** @description The repair wizard fragment. */
3713
+ 200: {
3714
+ headers: {
3715
+ [name: string]: unknown;
3716
+ };
3717
+ content: {
3718
+ "text/html": components["schemas"]["HtmlContent"];
3719
+ };
3720
+ };
3721
+ default: components["responses"]["ProblemResponse"];
3722
+ };
3723
+ };
3724
+ SiteBuildAlternative: {
3725
+ parameters: {
3726
+ query: {
3727
+ /** @description The failing sandbox session to analyze. */
3728
+ sessionId: components["schemas"]["SessionID"];
3729
+ dataPoints?: string[];
3730
+ mode?: "combine" | "ai";
3731
+ provided?: string[];
3732
+ pins?: {
3733
+ [key: string]: string;
3734
+ };
3735
+ exclude?: components["schemas"]["ProviderID"][];
3736
+ };
3737
+ header?: never;
3738
+ path: {
3739
+ domain: string;
3740
+ };
3741
+ cookie?: never;
3742
+ };
3743
+ requestBody?: never;
3744
+ responses: {
3745
+ /** @description No alternative — a fragment + `openRepair` HX-Trigger. */
3746
+ 200: {
3747
+ headers: {
3748
+ [name: string]: unknown;
3749
+ };
3750
+ content: {
3751
+ "text/html": components["schemas"]["HtmlContent"];
3752
+ };
3753
+ };
3754
+ /** @description Alternative found — `HX-Redirect` to the build page. */
3755
+ 204: {
3756
+ headers: {
3757
+ [name: string]: unknown;
3758
+ };
3759
+ content?: never;
3760
+ };
3761
+ default: components["responses"]["ProblemResponse"];
3762
+ };
3763
+ };
3764
+ SiteAiProvider: {
3765
+ parameters: {
3766
+ query?: {
3767
+ /** @description A specific missing data point to name in the prompt. */
3768
+ dataPoint?: string;
3769
+ /** @description A failed sandbox session whose error seeds the prompt. */
3770
+ sessionId?: components["schemas"]["SessionID"];
3771
+ /** @description A provider to version (when owned + editable) instead of creating one. */
3772
+ fromProviderId?: components["schemas"]["ProviderID"];
3773
+ dataPoints?: string[];
3774
+ mode?: "combine" | "ai";
3775
+ provided?: string[];
3776
+ pins?: {
3777
+ [key: string]: string;
3778
+ };
3779
+ exclude?: components["schemas"]["ProviderID"][];
3780
+ };
3781
+ header?: never;
3782
+ path: {
3783
+ domain: string;
3784
+ };
3785
+ cookie?: never;
3786
+ };
3787
+ requestBody?: never;
3788
+ responses: {
3789
+ /** @description The AI dialog body (editable prompt + Try with AI). */
3790
+ 200: {
3791
+ headers: {
3792
+ [name: string]: unknown;
3793
+ };
3794
+ content: {
3795
+ "text/html": components["schemas"]["HtmlContent"];
3796
+ };
3797
+ };
3798
+ default: components["responses"]["ProblemResponse"];
3799
+ };
3800
+ };
3801
+ SiteTryAi: {
3802
+ parameters: {
3803
+ query: {
3804
+ /** @description The AI provider to try. */
3805
+ providerId: components["schemas"]["ProviderID"];
3806
+ };
3807
+ header?: never;
3808
+ path: {
3809
+ domain: string;
3810
+ };
3811
+ cookie?: never;
3812
+ };
3813
+ /** @description An optional edited extraction prompt to save before trying. */
3814
+ requestBody?: {
3815
+ content: {
3816
+ "application/x-www-form-urlencoded": components["schemas"]["SiteTryAiBody"];
3817
+ "application/json": components["schemas"]["SiteTryAiBody"];
3818
+ };
3819
+ };
3820
+ responses: {
3821
+ /** @description Session created. */
3822
+ 201: {
3823
+ headers: {
3824
+ [name: string]: unknown;
3825
+ };
3826
+ content: {
3827
+ "application/json": components["schemas"]["VerificationSession"];
3828
+ };
3829
+ };
3830
+ /** @description Sandbox verification quota exceeded. */
3831
+ 429: {
3832
+ headers: {
3833
+ [name: string]: unknown;
3834
+ };
3835
+ content: {
3836
+ "application/problem+json": components["schemas"]["Problem"];
3837
+ };
3838
+ };
3839
+ default: components["responses"]["ProblemResponse"];
3840
+ };
3841
+ };
3569
3842
  DiscoverTeachAgent: {
3570
3843
  parameters: {
3571
3844
  query?: {
@@ -3591,6 +3864,8 @@ export interface operations {
3591
3864
  domain: string;
3592
3865
  /** @description Selected data-point names. Repeat to pass several. */
3593
3866
  dataPoints: string[];
3867
+ /** @description Resolution mode. `combine` (default) uses the fewest providers; `ai` is a forward-compat alias that resolves like combine for now. */
3868
+ mode?: "combine" | "ai";
3594
3869
  };
3595
3870
  header?: never;
3596
3871
  path?: never;
@@ -3598,21 +3873,78 @@ export interface operations {
3598
3873
  };
3599
3874
  requestBody?: never;
3600
3875
  responses: {
3601
- /** @description Covering providers (possibly none). */
3876
+ /** @description Resolved providers (possibly none). */
3602
3877
  200: {
3603
3878
  headers: {
3604
3879
  [name: string]: unknown;
3605
3880
  };
3606
3881
  content: {
3607
3882
  "application/json": {
3608
- /** @description The most specific covering provider's id, if any — a convenience for the common single-provider case. */
3883
+ /** @description The first resolved provider's id, if any — a convenience for the common single-provider case. */
3609
3884
  providerId?: components["schemas"]["ProviderID"];
3610
- /** @description True when no existing provider covers the full selection (a new one must be created/stitched). */
3885
+ /** @description True when some selected data point has no provider (see `uncovered`) — a new provider must be authored. */
3611
3886
  needsCreation: boolean;
3612
3887
  providers: {
3613
3888
  providerId: components["schemas"]["ProviderID"];
3614
3889
  slug: string;
3890
+ /** @description The selected data points this provider covers. */
3615
3891
  dataPoints: string[];
3892
+ /** @description Recent verification health for this provider (last 30 days). Present only when there is enough history (a minimum number of attempts) to be meaningful; absent for new or rarely-used providers. Used to break ranking ties between providers covering the same data points. */
3893
+ reliability?: {
3894
+ /**
3895
+ * Format: float
3896
+ * @description Fraction of recent sessions that started this provider and completed its claim without failure.
3897
+ */
3898
+ recentSuccessRate: number;
3899
+ /** @description Number of recent sessions that started this provider (the sample size behind `recentSuccessRate`). */
3900
+ attempts: number;
3901
+ };
3902
+ }[];
3903
+ /** @description Selected data points no existing provider exposes. */
3904
+ uncovered: string[];
3905
+ /** @description Inputs the consumer must supply at verification time (passed as session `context`). Collect these from the user. */
3906
+ requiredContext: {
3907
+ key: string;
3908
+ required: boolean;
3909
+ description?: string;
3910
+ }[];
3911
+ /** @description Whether the resolved providers fuse into one. Informational — `POST /verifications/sessions` already accepts the whole `providers` array. */
3912
+ merge: {
3913
+ mergeable: boolean;
3914
+ /** @description True when merging removes duplicate requests to the same endpoint (saved overfetch). */
3915
+ dedupedSomeRequests?: boolean;
3916
+ };
3917
+ };
3918
+ };
3919
+ };
3920
+ default: components["responses"]["ProblemResponse"];
3921
+ };
3922
+ };
3923
+ DiscoverDataPoints: {
3924
+ parameters: {
3925
+ query: {
3926
+ /** @description Website domain (normalized server-side). */
3927
+ domain: string;
3928
+ /** @description Case-insensitive filter over data-point names. */
3929
+ q?: string;
3930
+ };
3931
+ header?: never;
3932
+ path?: never;
3933
+ cookie?: never;
3934
+ };
3935
+ requestBody?: never;
3936
+ responses: {
3937
+ /** @description Verifiable data points (possibly none). */
3938
+ 200: {
3939
+ headers: {
3940
+ [name: string]: unknown;
3941
+ };
3942
+ content: {
3943
+ "application/json": {
3944
+ dataPoints: {
3945
+ name: string;
3946
+ description?: string;
3947
+ providerCount: number;
3616
3948
  }[];
3617
3949
  };
3618
3950
  };
@@ -5023,7 +5355,7 @@ export interface operations {
5023
5355
  };
5024
5356
  };
5025
5357
  301: components["responses"]["CanonicalRedirectResponse"];
5026
- /** @description Verification not found, or it is `PRIVATE` and the caller is not authorized to see it. */
5358
+ /** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
5027
5359
  404: {
5028
5360
  headers: {
5029
5361
  [name: string]: unknown;
@@ -5059,7 +5391,7 @@ export interface operations {
5059
5391
  };
5060
5392
  content?: never;
5061
5393
  };
5062
- /** @description Precondition Failed. The supplied `If-Match` does not match the verification's current `ETag` — re-fetch and retry. */
5394
+ /** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
5063
5395
  412: {
5064
5396
  headers: {
5065
5397
  [name: string]: unknown;
@@ -5104,7 +5436,7 @@ export interface operations {
5104
5436
  };
5105
5437
  };
5106
5438
  403: components["responses"]["ForbiddenResponse"];
5107
- /** @description Precondition Failed. The supplied `If-Match` does not match the verification's current `ETag` — re-fetch and retry. */
5439
+ /** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
5108
5440
  412: {
5109
5441
  headers: {
5110
5442
  [name: string]: unknown;
@@ -5120,7 +5452,7 @@ export interface operations {
5120
5452
  header?: never;
5121
5453
  path: {
5122
5454
  providerId: components["schemas"]["ProviderID"];
5123
- /** @description Verification slug. URL-safe identifier; lowercase letters, digits, and hyphens only. If stale, HTML callers get a 301 to the current slug. */
5455
+ /** @description Provider slug. URL-safe identifier; lowercase letters, digits, and hyphens only. If stale, HTML callers get a 301 to the current slug. */
5124
5456
  slug: string;
5125
5457
  };
5126
5458
  cookie?: never;
@@ -5139,7 +5471,7 @@ export interface operations {
5139
5471
  };
5140
5472
  };
5141
5473
  301: components["responses"]["CanonicalRedirectResponse"];
5142
- /** @description Verification not found, or it is `PRIVATE` and the caller is not authorized to see it. */
5474
+ /** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
5143
5475
  404: {
5144
5476
  headers: {
5145
5477
  [name: string]: unknown;