@reclaimprotocol/client 0.1.2 → 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.
- package/README.md +7 -5
- package/lib/routes.gen.d.ts +8 -0
- package/lib/routes.gen.js +2 -0
- package/lib/types/openapi.gen.d.ts +204 -70
- package/package.json +1 -1
- package/src/routes.gen.ts +2 -0
- package/src/types/openapi.gen.ts +204 -70
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ await reclaim.keypair.set(orgId, {
|
|
|
74
74
|
|
|
75
75
|
```ts
|
|
76
76
|
const session = await reclaim.sessions.create({
|
|
77
|
-
providerId: 'prov_…',
|
|
77
|
+
providers: [{ providerId: 'prov_…' }], // one or more, proved in order → one combined result
|
|
78
78
|
context: { userId: 'abc' },
|
|
79
79
|
})
|
|
80
80
|
console.log('open this:', session.verificationUrl) // hand to the end-user
|
|
@@ -87,8 +87,9 @@ curl -X POST "$BUILDER_URL/verifications/sessions" \
|
|
|
87
87
|
-H "Authorization: Bearer $RECLAIM_ORG_SECRET" \
|
|
88
88
|
-H 'Content-Type: application/json' \
|
|
89
89
|
-d '{
|
|
90
|
-
"providerId": "prov_…",
|
|
91
|
-
"context": { "userId": "abc" }
|
|
90
|
+
"providers": [{ "providerId": "prov_…" }],
|
|
91
|
+
"context": { "userId": "abc" },
|
|
92
|
+
"verificationClientUrl": "https://your.app/v/{sessionId}"
|
|
92
93
|
}'
|
|
93
94
|
# → 201 { "id": "…", "verificationUrl": "…", "status": "pending", "mode": "…", … }
|
|
94
95
|
```
|
|
@@ -140,7 +141,8 @@ Returns a `Reclaim` with four namespaces (`sessions`, `callbacks`, `keypair`, `r
|
|
|
140
141
|
### `reclaim.sessions`
|
|
141
142
|
|
|
142
143
|
```ts
|
|
143
|
-
reclaim.sessions.create({
|
|
144
|
+
reclaim.sessions.create({ providers, context, verificationClientUrl? })
|
|
145
|
+
// providers: { providerId, version? }[] — proved in order, one combined result; all required.
|
|
144
146
|
// → VerificationSession (has `id`, `verificationUrl`, `status`, `mode`, …)
|
|
145
147
|
// verificationClientUrl defaults to the Builder's own /v/{sessionId} page.
|
|
146
148
|
reclaim.sessions.get(sessionId) // → VerificationSession
|
|
@@ -248,7 +250,7 @@ const client = new ReclaimClient({ baseUrl, token, fetch, headers })
|
|
|
248
250
|
const { data, response } = await client.call('GetVerificationSession', { params: { sessionId } })
|
|
249
251
|
```
|
|
250
252
|
|
|
251
|
-
Errors are thrown as `ProblemError` (RFC 9457). `throwProblemError`, `DEFAULT_BASE_URL`, `USER_AGENT`, encoding helpers (`b64url`, `
|
|
253
|
+
Errors are thrown as `ProblemError` (RFC 9457). `throwProblemError`, `DEFAULT_BASE_URL`, `USER_AGENT`, and encoding helpers (`b64url`, `base64urlToBytes`, `bytesToHex`, `hexToBytes`) are also exported. The `call` method is fully typed against the generated OpenAPI operations.
|
|
252
254
|
|
|
253
255
|
## Security notes
|
|
254
256
|
|
package/lib/routes.gen.d.ts
CHANGED
|
@@ -343,6 +343,10 @@ export declare const ROUTES: {
|
|
|
343
343
|
readonly method: "post";
|
|
344
344
|
readonly path: "/providers/setup";
|
|
345
345
|
};
|
|
346
|
+
readonly SiteAiProvider: {
|
|
347
|
+
readonly method: "post";
|
|
348
|
+
readonly path: "/site/{domain}/ai-provider";
|
|
349
|
+
};
|
|
346
350
|
readonly SiteBuild: {
|
|
347
351
|
readonly method: "get";
|
|
348
352
|
readonly path: "/site/{domain}/build";
|
|
@@ -371,6 +375,10 @@ export declare const ROUTES: {
|
|
|
371
375
|
readonly method: "get";
|
|
372
376
|
readonly path: "/site/{domain}/panel";
|
|
373
377
|
};
|
|
378
|
+
readonly SiteTryAi: {
|
|
379
|
+
readonly method: "post";
|
|
380
|
+
readonly path: "/site/{domain}/try-ai";
|
|
381
|
+
};
|
|
374
382
|
readonly SubmitProviderVersionForReview: {
|
|
375
383
|
readonly method: "post";
|
|
376
384
|
readonly path: "/providers/{providerId}/versions/{version}/review";
|
package/lib/routes.gen.js
CHANGED
|
@@ -89,6 +89,7 @@ export const ROUTES = {
|
|
|
89
89
|
"SearchOrgMembers": { "method": "get", "path": "/orgs/{orgId}/members" },
|
|
90
90
|
"SetOrgKeypair": { "method": "put", "path": "/orgs/{orgId}/keypair" },
|
|
91
91
|
"SetupProviderCreate": { "method": "post", "path": "/providers/setup" },
|
|
92
|
+
"SiteAiProvider": { "method": "post", "path": "/site/{domain}/ai-provider" },
|
|
92
93
|
"SiteBuild": { "method": "get", "path": "/site/{domain}/build" },
|
|
93
94
|
"SiteBuildAlternative": { "method": "get", "path": "/site/{domain}/alternative" },
|
|
94
95
|
"SiteBuildRepair": { "method": "get", "path": "/site/{domain}/repair" },
|
|
@@ -96,6 +97,7 @@ export const ROUTES = {
|
|
|
96
97
|
"Sitemap": { "method": "get", "path": "/sitemap.xml" },
|
|
97
98
|
"SitePage": { "method": "get", "path": "/site/{domain}" },
|
|
98
99
|
"SitePanel": { "method": "get", "path": "/site/{domain}/panel" },
|
|
100
|
+
"SiteTryAi": { "method": "post", "path": "/site/{domain}/try-ai" },
|
|
99
101
|
"SubmitProviderVersionForReview": { "method": "post", "path": "/providers/{providerId}/versions/{version}/review" },
|
|
100
102
|
"SubmitVerificationResult": { "method": "post", "path": "/verifications/sessions/{sessionId}/result" },
|
|
101
103
|
"TransferProvider": { "method": "post", "path": "/providers/{providerId}/transfer" },
|
|
@@ -51,17 +51,17 @@ export interface paths {
|
|
|
51
51
|
cookie?: never;
|
|
52
52
|
};
|
|
53
53
|
/**
|
|
54
|
-
* Search
|
|
55
|
-
* @description Search published Reclaim
|
|
56
|
-
* Catalog page listing all
|
|
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
|
|
62
|
-
* @description Create a new Reclaim
|
|
63
|
-
* Creates a new
|
|
64
|
-
* The server also seeds an initial `0.1.0` version on the `draft` branch in the same transaction so the
|
|
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
|
|
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-
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
@@ -248,6 +248,46 @@ export interface paths {
|
|
|
248
248
|
patch?: never;
|
|
249
249
|
trace?: never;
|
|
250
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
|
+
};
|
|
251
291
|
"/discover/teach": {
|
|
252
292
|
parameters: {
|
|
253
293
|
query?: never;
|
|
@@ -257,7 +297,7 @@ export interface paths {
|
|
|
257
297
|
};
|
|
258
298
|
/**
|
|
259
299
|
* “Teach our agent” instructions for a missing website / data point
|
|
260
|
-
* @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
|
|
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).
|
|
261
301
|
*/
|
|
262
302
|
get: operations["DiscoverTeachAgent"];
|
|
263
303
|
put?: never;
|
|
@@ -276,7 +316,7 @@ export interface paths {
|
|
|
276
316
|
cookie?: never;
|
|
277
317
|
};
|
|
278
318
|
/**
|
|
279
|
-
* Resolve a website + data points to
|
|
319
|
+
* Resolve a website + data points to providers
|
|
280
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.
|
|
281
321
|
*
|
|
282
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.
|
|
@@ -318,8 +358,8 @@ export interface paths {
|
|
|
318
358
|
cookie?: never;
|
|
319
359
|
};
|
|
320
360
|
/**
|
|
321
|
-
* Get the
|
|
322
|
-
* @description Returns the 1200x630 PNG used in `<meta property="og:image">` for this
|
|
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`).
|
|
323
363
|
*/
|
|
324
364
|
get: operations["ProviderPreviewImage"];
|
|
325
365
|
put?: never;
|
|
@@ -378,8 +418,8 @@ export interface paths {
|
|
|
378
418
|
cookie?: never;
|
|
379
419
|
};
|
|
380
420
|
/**
|
|
381
|
-
* All
|
|
382
|
-
* @description Admin only. Lists all
|
|
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.
|
|
383
423
|
*/
|
|
384
424
|
get: operations["AdminProviders"];
|
|
385
425
|
put?: never;
|
|
@@ -514,8 +554,8 @@ export interface paths {
|
|
|
514
554
|
get?: never;
|
|
515
555
|
put?: never;
|
|
516
556
|
/**
|
|
517
|
-
* Transfer a
|
|
518
|
-
* @description Admin-only. Moves the
|
|
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.
|
|
519
559
|
*/
|
|
520
560
|
post: operations["TransferProvider"];
|
|
521
561
|
delete?: never;
|
|
@@ -1178,16 +1218,16 @@ export interface paths {
|
|
|
1178
1218
|
cookie?: never;
|
|
1179
1219
|
};
|
|
1180
1220
|
/**
|
|
1181
|
-
* Get a
|
|
1182
|
-
* @description Fetch a single Reclaim
|
|
1221
|
+
* Get a provider
|
|
1222
|
+
* @description Fetch a single Reclaim provider by id. Returns every field needed
|
|
1183
1223
|
* to integrate it into a flow: domain, the live version (initialUrl + requests),
|
|
1184
1224
|
* and the data points it can prove. Use `providers` first if you only
|
|
1185
1225
|
* have a query string.
|
|
1186
1226
|
*
|
|
1187
|
-
* Returns the
|
|
1227
|
+
* Returns the provider record.
|
|
1188
1228
|
*
|
|
1189
1229
|
* **Canonical URL.** For SEO and stable sharing, the canonical
|
|
1190
|
-
* HTML URL for a
|
|
1230
|
+
* HTML URL for a provider is `/providers/{providerId}/{slug}`
|
|
1191
1231
|
* (see `GetProviderBySlug`). HTML callers (`Accept: text/html`)
|
|
1192
1232
|
* that hit this route — which omits the slug — receive a `301`
|
|
1193
1233
|
* redirect to the slugged URL. JSON callers
|
|
@@ -1198,16 +1238,16 @@ export interface paths {
|
|
|
1198
1238
|
put?: never;
|
|
1199
1239
|
post?: never;
|
|
1200
1240
|
/**
|
|
1201
|
-
* Delete a
|
|
1202
|
-
* @description Owner of the
|
|
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`.
|
|
1203
1243
|
*/
|
|
1204
1244
|
delete: operations["DeleteProvider"];
|
|
1205
1245
|
options?: never;
|
|
1206
1246
|
head?: never;
|
|
1207
1247
|
/**
|
|
1208
|
-
* Update a
|
|
1209
|
-
* @description Update a Reclaim
|
|
1210
|
-
* Caller must be a member of the
|
|
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`.
|
|
1211
1251
|
*/
|
|
1212
1252
|
patch: operations["UpdateProvider"];
|
|
1213
1253
|
trace?: never;
|
|
@@ -1220,14 +1260,14 @@ export interface paths {
|
|
|
1220
1260
|
cookie?: never;
|
|
1221
1261
|
};
|
|
1222
1262
|
/**
|
|
1223
|
-
* Get a
|
|
1224
|
-
* @description Canonical HTML URL for a
|
|
1263
|
+
* Get a provider (canonical slugged URL)
|
|
1264
|
+
* @description Canonical HTML URL for a provider. The slug in the path is
|
|
1225
1265
|
* primarily an SEO and link-readability affordance — the
|
|
1226
|
-
*
|
|
1266
|
+
* provider is resolved by `providerId`.
|
|
1227
1267
|
*
|
|
1228
|
-
* - If `slug` matches the
|
|
1268
|
+
* - If `slug` matches the provider's current slug, returns the
|
|
1229
1269
|
* resource (HTML or JSON per `Accept`).
|
|
1230
|
-
* - If `slug` does not match (e.g. the
|
|
1270
|
+
* - If `slug` does not match (e.g. the provider was renamed since
|
|
1231
1271
|
* the URL was minted), HTML callers receive a `301` redirect
|
|
1232
1272
|
* to this same route with the *current* slug. JSON callers
|
|
1233
1273
|
* receive the resource directly with `200` regardless of slug
|
|
@@ -1254,22 +1294,22 @@ export interface paths {
|
|
|
1254
1294
|
cookie?: never;
|
|
1255
1295
|
};
|
|
1256
1296
|
/**
|
|
1257
|
-
* List a
|
|
1258
|
-
* @description Lists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the
|
|
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.
|
|
1259
1299
|
*/
|
|
1260
1300
|
get: operations["ListProviderVersions"];
|
|
1261
1301
|
put?: never;
|
|
1262
1302
|
/**
|
|
1263
|
-
* Create a new
|
|
1264
|
-
* @description Creates a new version of the
|
|
1265
|
-
* depends on the
|
|
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:
|
|
1266
1306
|
*
|
|
1267
|
-
* - `PRIVATE`
|
|
1307
|
+
* - `PRIVATE` provider (any caller): the live channel (no review).
|
|
1268
1308
|
*
|
|
1269
|
-
* - `PUBLIC`
|
|
1309
|
+
* - `PUBLIC` provider, admin caller (Reclaim staff): the live channel
|
|
1270
1310
|
* (no review).
|
|
1271
1311
|
*
|
|
1272
|
-
* - `PUBLIC`
|
|
1312
|
+
* - `PUBLIC` provider, non-admin caller: `draft` (or `ai` if
|
|
1273
1313
|
* authored by the AI assistant). Must pass review (see
|
|
1274
1314
|
* `POST /providers/{id}/versions/{version}/review`) before
|
|
1275
1315
|
* reaching the live channel.
|
|
@@ -1288,20 +1328,20 @@ export interface paths {
|
|
|
1288
1328
|
path?: never;
|
|
1289
1329
|
cookie?: never;
|
|
1290
1330
|
};
|
|
1291
|
-
/** Get a specific
|
|
1331
|
+
/** Get a specific provider version */
|
|
1292
1332
|
get: operations["GetProviderVersion"];
|
|
1293
1333
|
put?: never;
|
|
1294
1334
|
post?: never;
|
|
1295
1335
|
/**
|
|
1296
|
-
* Delete a
|
|
1297
|
-
* @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
|
|
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`.
|
|
1298
1338
|
*/
|
|
1299
1339
|
delete: operations["DeleteProviderVersion"];
|
|
1300
1340
|
options?: never;
|
|
1301
1341
|
head?: never;
|
|
1302
1342
|
/**
|
|
1303
|
-
* Update a
|
|
1304
|
-
* @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
|
|
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`.
|
|
1305
1345
|
*/
|
|
1306
1346
|
patch: operations["UpdateProviderVersion"];
|
|
1307
1347
|
trace?: never;
|
|
@@ -1316,8 +1356,8 @@ export interface paths {
|
|
|
1316
1356
|
get?: never;
|
|
1317
1357
|
put?: never;
|
|
1318
1358
|
/**
|
|
1319
|
-
* Submit a
|
|
1320
|
-
* @description Submits a
|
|
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.
|
|
1321
1361
|
*/
|
|
1322
1362
|
post: operations["SubmitProviderVersionForReview"];
|
|
1323
1363
|
delete?: never;
|
|
@@ -1336,8 +1376,8 @@ export interface paths {
|
|
|
1336
1376
|
get?: never;
|
|
1337
1377
|
put?: never;
|
|
1338
1378
|
/**
|
|
1339
|
-
* Record a decision on a
|
|
1340
|
-
* @description Admin only (Reclaim staff). Approves or rejects a
|
|
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.
|
|
1341
1381
|
* Until RBAC is designed, "admin" is detected via the user's email domain (`@reclaimprotocol.org`). Non-admin callers receive a 403.
|
|
1342
1382
|
*/
|
|
1343
1383
|
post: operations["DecideProviderVersionReview"];
|
|
@@ -1358,7 +1398,7 @@ export interface paths {
|
|
|
1358
1398
|
put?: never;
|
|
1359
1399
|
/**
|
|
1360
1400
|
* Publish a draft version directly (PRIVATE providers only)
|
|
1361
|
-
* @description Publishes a
|
|
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).
|
|
1362
1402
|
*/
|
|
1363
1403
|
post: operations["PublishProviderVersion"];
|
|
1364
1404
|
delete?: never;
|
|
@@ -2490,7 +2530,7 @@ export interface components {
|
|
|
2490
2530
|
primaryDataPoint?: string;
|
|
2491
2531
|
dataPoints: string[];
|
|
2492
2532
|
};
|
|
2493
|
-
/** @description One website (distinct domain) in the Discover search results. Aggregates, across every
|
|
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. */
|
|
2494
2534
|
WebsiteSuggestion: {
|
|
2495
2535
|
/**
|
|
2496
2536
|
* Format: hostname
|
|
@@ -2506,7 +2546,7 @@ export interface components {
|
|
|
2506
2546
|
iconUrl?: string;
|
|
2507
2547
|
/** @description Deduplicated names of every data point provable for this website. */
|
|
2508
2548
|
dataPoints: string[];
|
|
2509
|
-
/** @description Number of
|
|
2549
|
+
/** @description Number of providers backing this website that the caller can see. */
|
|
2510
2550
|
providerCount: number;
|
|
2511
2551
|
};
|
|
2512
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. */
|
|
@@ -2516,15 +2556,20 @@ export interface components {
|
|
|
2516
2556
|
[key: string]: string;
|
|
2517
2557
|
};
|
|
2518
2558
|
};
|
|
2519
|
-
/** @description
|
|
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. */
|
|
2520
2565
|
DataPointItem: {
|
|
2521
2566
|
/** @description Data-point name (e.g. `username`, `followers_count`). */
|
|
2522
2567
|
name: string;
|
|
2523
2568
|
/** @description Human description of the data point, taken from the response match that declares it. Absent when no match supplies one. */
|
|
2524
2569
|
description?: string;
|
|
2525
|
-
/** @description Number of visible
|
|
2570
|
+
/** @description Number of visible providers on the domain that expose this data point. */
|
|
2526
2571
|
providerCount: number;
|
|
2527
|
-
/** @description Slug of one
|
|
2572
|
+
/** @description Slug of one provider that exposes this data point. */
|
|
2528
2573
|
exampleProviderSlug?: string;
|
|
2529
2574
|
};
|
|
2530
2575
|
InterceptorOptions: {
|
|
@@ -2697,9 +2742,9 @@ export interface components {
|
|
|
2697
2742
|
/** @default [] */
|
|
2698
2743
|
allowedJsRequests: components["schemas"]["RequestSelectionTemplate"][];
|
|
2699
2744
|
/** @default structured */
|
|
2700
|
-
|
|
2745
|
+
verificationType: components["schemas"]["VerificationType"];
|
|
2701
2746
|
/** @description The prompt used for LLM verification (only when verificationType is "llm"). */
|
|
2702
|
-
|
|
2747
|
+
prompt?: string;
|
|
2703
2748
|
webSettings: components["schemas"]["ProviderWebSettings"];
|
|
2704
2749
|
requiredContext?: components["schemas"]["ProviderRequiredContext"];
|
|
2705
2750
|
};
|
|
@@ -2791,7 +2836,7 @@ export interface components {
|
|
|
2791
2836
|
};
|
|
2792
2837
|
/** @description `title` is optional — when omitted the dashboard renders `seoSuggestions.title` (server-derived from the scrape result or `derive_brand_name(domain)`). */
|
|
2793
2838
|
CreateProviderRequest: {
|
|
2794
|
-
/** @description uuid identifier of the organization that will own the
|
|
2839
|
+
/** @description uuid identifier of the organization that will own the provider. */
|
|
2795
2840
|
orgId: components["schemas"]["OrgID"];
|
|
2796
2841
|
/**
|
|
2797
2842
|
* Format: hostname
|
|
@@ -2835,8 +2880,12 @@ export interface components {
|
|
|
2835
2880
|
/** @description Author SEO fields. Send `null` for a subfield to clear that override and let `seoSuggestions` win again. */
|
|
2836
2881
|
seo?: components["schemas"]["ProviderSeo"];
|
|
2837
2882
|
};
|
|
2838
|
-
/** @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).
|
|
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. */
|
|
2839
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;
|
|
2840
2889
|
/**
|
|
2841
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.
|
|
2842
2891
|
* @default {
|
|
@@ -2857,10 +2906,13 @@ export interface components {
|
|
|
2857
2906
|
/** @description Free-form change note recorded on `createMetadata`. */
|
|
2858
2907
|
notes?: string;
|
|
2859
2908
|
};
|
|
2860
|
-
/** @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`
|
|
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. */
|
|
2861
2910
|
UpdateProviderVersionRequest: {
|
|
2862
2911
|
/** Format: uri */
|
|
2863
2912
|
initialUrl?: string;
|
|
2913
|
+
verificationType?: components["schemas"]["VerificationType"];
|
|
2914
|
+
/** @description Extraction prompt, used when `verificationType` is `llm`. */
|
|
2915
|
+
prompt?: string;
|
|
2864
2916
|
requests?: components["schemas"]["RequestSelection"][];
|
|
2865
2917
|
allowedJsRequests?: components["schemas"]["RequestSelectionTemplate"][];
|
|
2866
2918
|
webSettings?: components["schemas"]["ProviderWebSettings"];
|
|
@@ -3534,9 +3586,13 @@ export interface operations {
|
|
|
3534
3586
|
};
|
|
3535
3587
|
SiteBuild: {
|
|
3536
3588
|
parameters: {
|
|
3537
|
-
query
|
|
3538
|
-
/** @description Selected data-point names. Repeat to pass several. */
|
|
3539
|
-
dataPoints
|
|
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;
|
|
3540
3596
|
/** @description `combine` (default) minimizes to the fewest providers (set-cover); `ai` is a forward-compat alias that currently resolves like combine. */
|
|
3541
3597
|
mode?: "combine" | "ai";
|
|
3542
3598
|
/** @description Source pins: `pins[<dataPoint>]=id,id`. Maps each data-point name to a comma-joined list of preferred providerIds. Omit for Auto. */
|
|
@@ -3705,6 +3761,84 @@ export interface operations {
|
|
|
3705
3761
|
default: components["responses"]["ProblemResponse"];
|
|
3706
3762
|
};
|
|
3707
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
|
+
};
|
|
3708
3842
|
DiscoverTeachAgent: {
|
|
3709
3843
|
parameters: {
|
|
3710
3844
|
query?: {
|
|
@@ -5221,7 +5355,7 @@ export interface operations {
|
|
|
5221
5355
|
};
|
|
5222
5356
|
};
|
|
5223
5357
|
301: components["responses"]["CanonicalRedirectResponse"];
|
|
5224
|
-
/** @description
|
|
5358
|
+
/** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
|
|
5225
5359
|
404: {
|
|
5226
5360
|
headers: {
|
|
5227
5361
|
[name: string]: unknown;
|
|
@@ -5257,7 +5391,7 @@ export interface operations {
|
|
|
5257
5391
|
};
|
|
5258
5392
|
content?: never;
|
|
5259
5393
|
};
|
|
5260
|
-
/** @description Precondition Failed. The supplied `If-Match` does not match the
|
|
5394
|
+
/** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
|
|
5261
5395
|
412: {
|
|
5262
5396
|
headers: {
|
|
5263
5397
|
[name: string]: unknown;
|
|
@@ -5302,7 +5436,7 @@ export interface operations {
|
|
|
5302
5436
|
};
|
|
5303
5437
|
};
|
|
5304
5438
|
403: components["responses"]["ForbiddenResponse"];
|
|
5305
|
-
/** @description Precondition Failed. The supplied `If-Match` does not match the
|
|
5439
|
+
/** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
|
|
5306
5440
|
412: {
|
|
5307
5441
|
headers: {
|
|
5308
5442
|
[name: string]: unknown;
|
|
@@ -5318,7 +5452,7 @@ export interface operations {
|
|
|
5318
5452
|
header?: never;
|
|
5319
5453
|
path: {
|
|
5320
5454
|
providerId: components["schemas"]["ProviderID"];
|
|
5321
|
-
/** @description
|
|
5455
|
+
/** @description Provider slug. URL-safe identifier; lowercase letters, digits, and hyphens only. If stale, HTML callers get a 301 to the current slug. */
|
|
5322
5456
|
slug: string;
|
|
5323
5457
|
};
|
|
5324
5458
|
cookie?: never;
|
|
@@ -5337,7 +5471,7 @@ export interface operations {
|
|
|
5337
5471
|
};
|
|
5338
5472
|
};
|
|
5339
5473
|
301: components["responses"]["CanonicalRedirectResponse"];
|
|
5340
|
-
/** @description
|
|
5474
|
+
/** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
|
|
5341
5475
|
404: {
|
|
5342
5476
|
headers: {
|
|
5343
5477
|
[name: string]: unknown;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reclaimprotocol/client",
|
|
3
3
|
"title": "Reclaim Client",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"description": "Typed SDK client for @reclaimprotocol/app. Used by @reclaimprotocol/agent and any other consumer that needs programmatic API access without the full agent.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": false,
|
package/src/routes.gen.ts
CHANGED
|
@@ -90,6 +90,7 @@ export const ROUTES = {
|
|
|
90
90
|
"SearchOrgMembers": {"method":"get","path":"/orgs/{orgId}/members"},
|
|
91
91
|
"SetOrgKeypair": {"method":"put","path":"/orgs/{orgId}/keypair"},
|
|
92
92
|
"SetupProviderCreate": {"method":"post","path":"/providers/setup"},
|
|
93
|
+
"SiteAiProvider": {"method":"post","path":"/site/{domain}/ai-provider"},
|
|
93
94
|
"SiteBuild": {"method":"get","path":"/site/{domain}/build"},
|
|
94
95
|
"SiteBuildAlternative": {"method":"get","path":"/site/{domain}/alternative"},
|
|
95
96
|
"SiteBuildRepair": {"method":"get","path":"/site/{domain}/repair"},
|
|
@@ -97,6 +98,7 @@ export const ROUTES = {
|
|
|
97
98
|
"Sitemap": {"method":"get","path":"/sitemap.xml"},
|
|
98
99
|
"SitePage": {"method":"get","path":"/site/{domain}"},
|
|
99
100
|
"SitePanel": {"method":"get","path":"/site/{domain}/panel"},
|
|
101
|
+
"SiteTryAi": {"method":"post","path":"/site/{domain}/try-ai"},
|
|
100
102
|
"SubmitProviderVersionForReview": {"method":"post","path":"/providers/{providerId}/versions/{version}/review"},
|
|
101
103
|
"SubmitVerificationResult": {"method":"post","path":"/verifications/sessions/{sessionId}/result"},
|
|
102
104
|
"TransferProvider": {"method":"post","path":"/providers/{providerId}/transfer"},
|
package/src/types/openapi.gen.ts
CHANGED
|
@@ -52,17 +52,17 @@ export interface paths {
|
|
|
52
52
|
cookie?: never;
|
|
53
53
|
};
|
|
54
54
|
/**
|
|
55
|
-
* Search
|
|
56
|
-
* @description Search published Reclaim
|
|
57
|
-
* Catalog page listing all
|
|
55
|
+
* Search providers
|
|
56
|
+
* @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.
|
|
57
|
+
* 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.
|
|
58
58
|
*/
|
|
59
59
|
get: operations["Providers"];
|
|
60
60
|
put?: never;
|
|
61
61
|
/**
|
|
62
|
-
* Create a
|
|
63
|
-
* @description Create a new Reclaim
|
|
64
|
-
* Creates a new
|
|
65
|
-
* The server also seeds an initial `0.1.0` version on the `draft` branch in the same transaction so the
|
|
62
|
+
* Create a provider
|
|
63
|
+
* @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.
|
|
64
|
+
* 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`.
|
|
65
|
+
* 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.
|
|
66
66
|
*/
|
|
67
67
|
post: operations["CreateProvider"];
|
|
68
68
|
delete?: never;
|
|
@@ -81,7 +81,7 @@ export interface paths {
|
|
|
81
81
|
get?: never;
|
|
82
82
|
put?: never;
|
|
83
83
|
/**
|
|
84
|
-
* Suggest
|
|
84
|
+
* Suggest provider fields from a domain/URL scrape
|
|
85
85
|
* @description Pre-flight for `POST /providers`. Accepts a URL or bare
|
|
86
86
|
* domain, scrapes the page head with a short timeout, and
|
|
87
87
|
* returns suggested values (`title`, `slug`, `iconUrl`, brand
|
|
@@ -90,7 +90,7 @@ export interface paths {
|
|
|
90
90
|
*
|
|
91
91
|
* - HTML / HTMX callers receive the step-2 form HTML
|
|
92
92
|
* pre-filled with the suggestions (swapped into the
|
|
93
|
-
* create-
|
|
93
|
+
* create-provider dialog body).
|
|
94
94
|
* - JSON / SDK / agent callers receive the same suggestions
|
|
95
95
|
* as a JSON document so they can build their own UI or
|
|
96
96
|
* submit the create request directly.
|
|
@@ -114,7 +114,7 @@ export interface paths {
|
|
|
114
114
|
};
|
|
115
115
|
/**
|
|
116
116
|
* Suggest websites for the Discover flow
|
|
117
|
-
* @description Website-first autocomplete that backs the Discover home page (`/`). Returns the distinct websites (one entry per domain) that have at least one
|
|
117
|
+
* @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).
|
|
118
118
|
*
|
|
119
119
|
* HTML / HTMX callers receive a fragment list (swapped into the search dropdown); JSON / SDK callers receive the suggestions document.
|
|
120
120
|
*/
|
|
@@ -136,7 +136,7 @@ export interface paths {
|
|
|
136
136
|
};
|
|
137
137
|
/**
|
|
138
138
|
* Website landing & data-point selection page
|
|
139
|
-
* @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
|
|
139
|
+
* @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.
|
|
140
140
|
*
|
|
141
141
|
* 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.
|
|
142
142
|
*/
|
|
@@ -178,7 +178,7 @@ export interface paths {
|
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
180
180
|
* Build page — providers, try, and integration guide for a selection
|
|
181
|
-
* @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
|
|
181
|
+
* @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.
|
|
182
182
|
*/
|
|
183
183
|
get: operations["SiteBuild"];
|
|
184
184
|
put?: never;
|
|
@@ -249,6 +249,46 @@ export interface paths {
|
|
|
249
249
|
patch?: never;
|
|
250
250
|
trace?: never;
|
|
251
251
|
};
|
|
252
|
+
"/site/{domain}/ai-provider": {
|
|
253
|
+
parameters: {
|
|
254
|
+
query?: never;
|
|
255
|
+
header?: never;
|
|
256
|
+
path?: never;
|
|
257
|
+
cookie?: never;
|
|
258
|
+
};
|
|
259
|
+
get?: never;
|
|
260
|
+
put?: never;
|
|
261
|
+
/**
|
|
262
|
+
* Author an AI (llm) provider and go to its build screen
|
|
263
|
+
* @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.
|
|
264
|
+
*/
|
|
265
|
+
post: operations["SiteAiProvider"];
|
|
266
|
+
delete?: never;
|
|
267
|
+
options?: never;
|
|
268
|
+
head?: never;
|
|
269
|
+
patch?: never;
|
|
270
|
+
trace?: never;
|
|
271
|
+
};
|
|
272
|
+
"/site/{domain}/try-ai": {
|
|
273
|
+
parameters: {
|
|
274
|
+
query?: never;
|
|
275
|
+
header?: never;
|
|
276
|
+
path?: never;
|
|
277
|
+
cookie?: never;
|
|
278
|
+
};
|
|
279
|
+
get?: never;
|
|
280
|
+
put?: never;
|
|
281
|
+
/**
|
|
282
|
+
* Mint a SANDBOX test session for an AI (llm) provider
|
|
283
|
+
* @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.
|
|
284
|
+
*/
|
|
285
|
+
post: operations["SiteTryAi"];
|
|
286
|
+
delete?: never;
|
|
287
|
+
options?: never;
|
|
288
|
+
head?: never;
|
|
289
|
+
patch?: never;
|
|
290
|
+
trace?: never;
|
|
291
|
+
};
|
|
252
292
|
"/discover/teach": {
|
|
253
293
|
parameters: {
|
|
254
294
|
query?: never;
|
|
@@ -258,7 +298,7 @@ export interface paths {
|
|
|
258
298
|
};
|
|
259
299
|
/**
|
|
260
300
|
* “Teach our agent” instructions for a missing website / data point
|
|
261
|
-
* @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
|
|
301
|
+
* @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).
|
|
262
302
|
*/
|
|
263
303
|
get: operations["DiscoverTeachAgent"];
|
|
264
304
|
put?: never;
|
|
@@ -277,7 +317,7 @@ export interface paths {
|
|
|
277
317
|
cookie?: never;
|
|
278
318
|
};
|
|
279
319
|
/**
|
|
280
|
-
* Resolve a website + data points to
|
|
320
|
+
* Resolve a website + data points to providers
|
|
281
321
|
* @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.
|
|
282
322
|
*
|
|
283
323
|
* 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.
|
|
@@ -319,8 +359,8 @@ export interface paths {
|
|
|
319
359
|
cookie?: never;
|
|
320
360
|
};
|
|
321
361
|
/**
|
|
322
|
-
* Get the
|
|
323
|
-
* @description Returns the 1200x630 PNG used in `<meta property="og:image">` for this
|
|
362
|
+
* Get the provider's OG preview image
|
|
363
|
+
* @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`).
|
|
324
364
|
*/
|
|
325
365
|
get: operations["ProviderPreviewImage"];
|
|
326
366
|
put?: never;
|
|
@@ -379,8 +419,8 @@ export interface paths {
|
|
|
379
419
|
cookie?: never;
|
|
380
420
|
};
|
|
381
421
|
/**
|
|
382
|
-
* All
|
|
383
|
-
* @description Admin only. Lists all
|
|
422
|
+
* All providers (admin-only)
|
|
423
|
+
* @description Admin only. Lists all providers across all organizations. Supports filtering by visibility, status, and free-text search on title/domain/slug.
|
|
384
424
|
*/
|
|
385
425
|
get: operations["AdminProviders"];
|
|
386
426
|
put?: never;
|
|
@@ -515,8 +555,8 @@ export interface paths {
|
|
|
515
555
|
get?: never;
|
|
516
556
|
put?: never;
|
|
517
557
|
/**
|
|
518
|
-
* Transfer a
|
|
519
|
-
* @description Admin-only. Moves the
|
|
558
|
+
* Transfer a provider to a different workspace
|
|
559
|
+
* @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.
|
|
520
560
|
*/
|
|
521
561
|
post: operations["TransferProvider"];
|
|
522
562
|
delete?: never;
|
|
@@ -1179,16 +1219,16 @@ export interface paths {
|
|
|
1179
1219
|
cookie?: never;
|
|
1180
1220
|
};
|
|
1181
1221
|
/**
|
|
1182
|
-
* Get a
|
|
1183
|
-
* @description Fetch a single Reclaim
|
|
1222
|
+
* Get a provider
|
|
1223
|
+
* @description Fetch a single Reclaim provider by id. Returns every field needed
|
|
1184
1224
|
* to integrate it into a flow: domain, the live version (initialUrl + requests),
|
|
1185
1225
|
* and the data points it can prove. Use `providers` first if you only
|
|
1186
1226
|
* have a query string.
|
|
1187
1227
|
*
|
|
1188
|
-
* Returns the
|
|
1228
|
+
* Returns the provider record.
|
|
1189
1229
|
*
|
|
1190
1230
|
* **Canonical URL.** For SEO and stable sharing, the canonical
|
|
1191
|
-
* HTML URL for a
|
|
1231
|
+
* HTML URL for a provider is `/providers/{providerId}/{slug}`
|
|
1192
1232
|
* (see `GetProviderBySlug`). HTML callers (`Accept: text/html`)
|
|
1193
1233
|
* that hit this route — which omits the slug — receive a `301`
|
|
1194
1234
|
* redirect to the slugged URL. JSON callers
|
|
@@ -1199,16 +1239,16 @@ export interface paths {
|
|
|
1199
1239
|
put?: never;
|
|
1200
1240
|
post?: never;
|
|
1201
1241
|
/**
|
|
1202
|
-
* Delete a
|
|
1203
|
-
* @description Owner of the
|
|
1242
|
+
* Delete a provider
|
|
1243
|
+
* @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`.
|
|
1204
1244
|
*/
|
|
1205
1245
|
delete: operations["DeleteProvider"];
|
|
1206
1246
|
options?: never;
|
|
1207
1247
|
head?: never;
|
|
1208
1248
|
/**
|
|
1209
|
-
* Update a
|
|
1210
|
-
* @description Update a Reclaim
|
|
1211
|
-
* Caller must be a member of the
|
|
1249
|
+
* Update a provider
|
|
1250
|
+
* @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.
|
|
1251
|
+
* Caller must be a member of the provider's owning organization. `id`, `orgId`, and `slug` are immutable. Supports optimistic concurrency via `If-Match`.
|
|
1212
1252
|
*/
|
|
1213
1253
|
patch: operations["UpdateProvider"];
|
|
1214
1254
|
trace?: never;
|
|
@@ -1221,14 +1261,14 @@ export interface paths {
|
|
|
1221
1261
|
cookie?: never;
|
|
1222
1262
|
};
|
|
1223
1263
|
/**
|
|
1224
|
-
* Get a
|
|
1225
|
-
* @description Canonical HTML URL for a
|
|
1264
|
+
* Get a provider (canonical slugged URL)
|
|
1265
|
+
* @description Canonical HTML URL for a provider. The slug in the path is
|
|
1226
1266
|
* primarily an SEO and link-readability affordance — the
|
|
1227
|
-
*
|
|
1267
|
+
* provider is resolved by `providerId`.
|
|
1228
1268
|
*
|
|
1229
|
-
* - If `slug` matches the
|
|
1269
|
+
* - If `slug` matches the provider's current slug, returns the
|
|
1230
1270
|
* resource (HTML or JSON per `Accept`).
|
|
1231
|
-
* - If `slug` does not match (e.g. the
|
|
1271
|
+
* - If `slug` does not match (e.g. the provider was renamed since
|
|
1232
1272
|
* the URL was minted), HTML callers receive a `301` redirect
|
|
1233
1273
|
* to this same route with the *current* slug. JSON callers
|
|
1234
1274
|
* receive the resource directly with `200` regardless of slug
|
|
@@ -1255,22 +1295,22 @@ export interface paths {
|
|
|
1255
1295
|
cookie?: never;
|
|
1256
1296
|
};
|
|
1257
1297
|
/**
|
|
1258
|
-
* List a
|
|
1259
|
-
* @description Lists versions visible to the caller. Non-public branches (`ai`, `draft`, `in_review`, `rejected`) are only visible to members of the
|
|
1298
|
+
* List a provider's versions
|
|
1299
|
+
* @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.
|
|
1260
1300
|
*/
|
|
1261
1301
|
get: operations["ListProviderVersions"];
|
|
1262
1302
|
put?: never;
|
|
1263
1303
|
/**
|
|
1264
|
-
* Create a new
|
|
1265
|
-
* @description Creates a new version of the
|
|
1266
|
-
* depends on the
|
|
1304
|
+
* Create a new provider version
|
|
1305
|
+
* @description Creates a new version of the provider. The starting branch
|
|
1306
|
+
* depends on the provider's `visibility` and the caller's role:
|
|
1267
1307
|
*
|
|
1268
|
-
* - `PRIVATE`
|
|
1308
|
+
* - `PRIVATE` provider (any caller): the live channel (no review).
|
|
1269
1309
|
*
|
|
1270
|
-
* - `PUBLIC`
|
|
1310
|
+
* - `PUBLIC` provider, admin caller (Reclaim staff): the live channel
|
|
1271
1311
|
* (no review).
|
|
1272
1312
|
*
|
|
1273
|
-
* - `PUBLIC`
|
|
1313
|
+
* - `PUBLIC` provider, non-admin caller: `draft` (or `ai` if
|
|
1274
1314
|
* authored by the AI assistant). Must pass review (see
|
|
1275
1315
|
* `POST /providers/{id}/versions/{version}/review`) before
|
|
1276
1316
|
* reaching the live channel.
|
|
@@ -1289,20 +1329,20 @@ export interface paths {
|
|
|
1289
1329
|
path?: never;
|
|
1290
1330
|
cookie?: never;
|
|
1291
1331
|
};
|
|
1292
|
-
/** Get a specific
|
|
1332
|
+
/** Get a specific provider version */
|
|
1293
1333
|
get: operations["GetProviderVersion"];
|
|
1294
1334
|
put?: never;
|
|
1295
1335
|
post?: never;
|
|
1296
1336
|
/**
|
|
1297
|
-
* Delete a
|
|
1298
|
-
* @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
|
|
1337
|
+
* Delete a provider version
|
|
1338
|
+
* @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`.
|
|
1299
1339
|
*/
|
|
1300
1340
|
delete: operations["DeleteProviderVersion"];
|
|
1301
1341
|
options?: never;
|
|
1302
1342
|
head?: never;
|
|
1303
1343
|
/**
|
|
1304
|
-
* Update a
|
|
1305
|
-
* @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
|
|
1344
|
+
* Update a provider version
|
|
1345
|
+
* @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`.
|
|
1306
1346
|
*/
|
|
1307
1347
|
patch: operations["UpdateProviderVersion"];
|
|
1308
1348
|
trace?: never;
|
|
@@ -1317,8 +1357,8 @@ export interface paths {
|
|
|
1317
1357
|
get?: never;
|
|
1318
1358
|
put?: never;
|
|
1319
1359
|
/**
|
|
1320
|
-
* Submit a
|
|
1321
|
-
* @description Submits a
|
|
1360
|
+
* Submit a provider version for review
|
|
1361
|
+
* @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.
|
|
1322
1362
|
*/
|
|
1323
1363
|
post: operations["SubmitProviderVersionForReview"];
|
|
1324
1364
|
delete?: never;
|
|
@@ -1337,8 +1377,8 @@ export interface paths {
|
|
|
1337
1377
|
get?: never;
|
|
1338
1378
|
put?: never;
|
|
1339
1379
|
/**
|
|
1340
|
-
* Record a decision on a
|
|
1341
|
-
* @description Admin only (Reclaim staff). Approves or rejects a
|
|
1380
|
+
* Record a decision on a provider version review
|
|
1381
|
+
* @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.
|
|
1342
1382
|
* Until RBAC is designed, "admin" is detected via the user's email domain (`@reclaimprotocol.org`). Non-admin callers receive a 403.
|
|
1343
1383
|
*/
|
|
1344
1384
|
post: operations["DecideProviderVersionReview"];
|
|
@@ -1359,7 +1399,7 @@ export interface paths {
|
|
|
1359
1399
|
put?: never;
|
|
1360
1400
|
/**
|
|
1361
1401
|
* Publish a draft version directly (PRIVATE providers only)
|
|
1362
|
-
* @description Publishes a
|
|
1402
|
+
* @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).
|
|
1363
1403
|
*/
|
|
1364
1404
|
post: operations["PublishProviderVersion"];
|
|
1365
1405
|
delete?: never;
|
|
@@ -2491,7 +2531,7 @@ export interface components {
|
|
|
2491
2531
|
primaryDataPoint?: string;
|
|
2492
2532
|
dataPoints: string[];
|
|
2493
2533
|
};
|
|
2494
|
-
/** @description One website (distinct domain) in the Discover search results. Aggregates, across every
|
|
2534
|
+
/** @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. */
|
|
2495
2535
|
WebsiteSuggestion: {
|
|
2496
2536
|
/**
|
|
2497
2537
|
* Format: hostname
|
|
@@ -2507,7 +2547,7 @@ export interface components {
|
|
|
2507
2547
|
iconUrl?: string;
|
|
2508
2548
|
/** @description Deduplicated names of every data point provable for this website. */
|
|
2509
2549
|
dataPoints: string[];
|
|
2510
|
-
/** @description Number of
|
|
2550
|
+
/** @description Number of providers backing this website that the caller can see. */
|
|
2511
2551
|
providerCount: number;
|
|
2512
2552
|
};
|
|
2513
2553
|
/** @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. */
|
|
@@ -2517,15 +2557,20 @@ export interface components {
|
|
|
2517
2557
|
[key: string]: string;
|
|
2518
2558
|
};
|
|
2519
2559
|
};
|
|
2520
|
-
/** @description
|
|
2560
|
+
/** @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. */
|
|
2561
|
+
SiteTryAiBody: {
|
|
2562
|
+
/** @description The edited extraction prompt for the AI provider. */
|
|
2563
|
+
prompt?: string;
|
|
2564
|
+
};
|
|
2565
|
+
/** @description A single data point selectable on the `/site/{domain}` page, with how many visible providers expose it and one example provider slug. */
|
|
2521
2566
|
DataPointItem: {
|
|
2522
2567
|
/** @description Data-point name (e.g. `username`, `followers_count`). */
|
|
2523
2568
|
name: string;
|
|
2524
2569
|
/** @description Human description of the data point, taken from the response match that declares it. Absent when no match supplies one. */
|
|
2525
2570
|
description?: string;
|
|
2526
|
-
/** @description Number of visible
|
|
2571
|
+
/** @description Number of visible providers on the domain that expose this data point. */
|
|
2527
2572
|
providerCount: number;
|
|
2528
|
-
/** @description Slug of one
|
|
2573
|
+
/** @description Slug of one provider that exposes this data point. */
|
|
2529
2574
|
exampleProviderSlug?: string;
|
|
2530
2575
|
};
|
|
2531
2576
|
InterceptorOptions: {
|
|
@@ -2698,9 +2743,9 @@ export interface components {
|
|
|
2698
2743
|
/** @default [] */
|
|
2699
2744
|
allowedJsRequests: components["schemas"]["RequestSelectionTemplate"][];
|
|
2700
2745
|
/** @default structured */
|
|
2701
|
-
|
|
2746
|
+
verificationType: components["schemas"]["VerificationType"];
|
|
2702
2747
|
/** @description The prompt used for LLM verification (only when verificationType is "llm"). */
|
|
2703
|
-
|
|
2748
|
+
prompt?: string;
|
|
2704
2749
|
webSettings: components["schemas"]["ProviderWebSettings"];
|
|
2705
2750
|
requiredContext?: components["schemas"]["ProviderRequiredContext"];
|
|
2706
2751
|
};
|
|
@@ -2792,7 +2837,7 @@ export interface components {
|
|
|
2792
2837
|
};
|
|
2793
2838
|
/** @description `title` is optional — when omitted the dashboard renders `seoSuggestions.title` (server-derived from the scrape result or `derive_brand_name(domain)`). */
|
|
2794
2839
|
CreateProviderRequest: {
|
|
2795
|
-
/** @description uuid identifier of the organization that will own the
|
|
2840
|
+
/** @description uuid identifier of the organization that will own the provider. */
|
|
2796
2841
|
orgId: components["schemas"]["OrgID"];
|
|
2797
2842
|
/**
|
|
2798
2843
|
* Format: hostname
|
|
@@ -2836,8 +2881,12 @@ export interface components {
|
|
|
2836
2881
|
/** @description Author SEO fields. Send `null` for a subfield to clear that override and let `seoSuggestions` win again. */
|
|
2837
2882
|
seo?: components["schemas"]["ProviderSeo"];
|
|
2838
2883
|
};
|
|
2839
|
-
/** @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).
|
|
2884
|
+
/** @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. */
|
|
2840
2885
|
CreateProviderVersionRequest: {
|
|
2886
|
+
/** @description Defaults to `structured` server-side when omitted; pass `llm` (with a `prompt`) to author an AI-verification provider. */
|
|
2887
|
+
verificationType?: components["schemas"]["VerificationType"];
|
|
2888
|
+
/** @description Extraction prompt, used (and required) when `verificationType` is `llm`. */
|
|
2889
|
+
prompt?: string;
|
|
2841
2890
|
/**
|
|
2842
2891
|
* @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.
|
|
2843
2892
|
* @default {
|
|
@@ -2858,10 +2907,13 @@ export interface components {
|
|
|
2858
2907
|
/** @description Free-form change note recorded on `createMetadata`. */
|
|
2859
2908
|
notes?: string;
|
|
2860
2909
|
};
|
|
2861
|
-
/** @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`
|
|
2910
|
+
/** @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. */
|
|
2862
2911
|
UpdateProviderVersionRequest: {
|
|
2863
2912
|
/** Format: uri */
|
|
2864
2913
|
initialUrl?: string;
|
|
2914
|
+
verificationType?: components["schemas"]["VerificationType"];
|
|
2915
|
+
/** @description Extraction prompt, used when `verificationType` is `llm`. */
|
|
2916
|
+
prompt?: string;
|
|
2865
2917
|
requests?: components["schemas"]["RequestSelection"][];
|
|
2866
2918
|
allowedJsRequests?: components["schemas"]["RequestSelectionTemplate"][];
|
|
2867
2919
|
webSettings?: components["schemas"]["ProviderWebSettings"];
|
|
@@ -3535,9 +3587,13 @@ export interface operations {
|
|
|
3535
3587
|
};
|
|
3536
3588
|
SiteBuild: {
|
|
3537
3589
|
parameters: {
|
|
3538
|
-
query
|
|
3539
|
-
/** @description Selected data-point names. Repeat to pass several. */
|
|
3540
|
-
dataPoints
|
|
3590
|
+
query?: {
|
|
3591
|
+
/** @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. */
|
|
3592
|
+
dataPoints?: string[];
|
|
3593
|
+
/** @description When set, auto-opens the "Try with AI" dialog on load (the "Build it with AI" entry from the explore page). */
|
|
3594
|
+
ai?: string;
|
|
3595
|
+
/** @description A specific missing data point to seed the AI prompt with. */
|
|
3596
|
+
dataPoint?: string;
|
|
3541
3597
|
/** @description `combine` (default) minimizes to the fewest providers (set-cover); `ai` is a forward-compat alias that currently resolves like combine. */
|
|
3542
3598
|
mode?: "combine" | "ai";
|
|
3543
3599
|
/** @description Source pins: `pins[<dataPoint>]=id,id`. Maps each data-point name to a comma-joined list of preferred providerIds. Omit for Auto. */
|
|
@@ -3706,6 +3762,84 @@ export interface operations {
|
|
|
3706
3762
|
default: components["responses"]["ProblemResponse"];
|
|
3707
3763
|
};
|
|
3708
3764
|
};
|
|
3765
|
+
SiteAiProvider: {
|
|
3766
|
+
parameters: {
|
|
3767
|
+
query?: {
|
|
3768
|
+
/** @description A specific missing data point to name in the prompt. */
|
|
3769
|
+
dataPoint?: string;
|
|
3770
|
+
/** @description A failed sandbox session whose error seeds the prompt. */
|
|
3771
|
+
sessionId?: components["schemas"]["SessionID"];
|
|
3772
|
+
/** @description A provider to version (when owned + editable) instead of creating one. */
|
|
3773
|
+
fromProviderId?: components["schemas"]["ProviderID"];
|
|
3774
|
+
dataPoints?: string[];
|
|
3775
|
+
mode?: "combine" | "ai";
|
|
3776
|
+
provided?: string[];
|
|
3777
|
+
pins?: {
|
|
3778
|
+
[key: string]: string;
|
|
3779
|
+
};
|
|
3780
|
+
exclude?: components["schemas"]["ProviderID"][];
|
|
3781
|
+
};
|
|
3782
|
+
header?: never;
|
|
3783
|
+
path: {
|
|
3784
|
+
domain: string;
|
|
3785
|
+
};
|
|
3786
|
+
cookie?: never;
|
|
3787
|
+
};
|
|
3788
|
+
requestBody?: never;
|
|
3789
|
+
responses: {
|
|
3790
|
+
/** @description The AI dialog body (editable prompt + Try with AI). */
|
|
3791
|
+
200: {
|
|
3792
|
+
headers: {
|
|
3793
|
+
[name: string]: unknown;
|
|
3794
|
+
};
|
|
3795
|
+
content: {
|
|
3796
|
+
"text/html": components["schemas"]["HtmlContent"];
|
|
3797
|
+
};
|
|
3798
|
+
};
|
|
3799
|
+
default: components["responses"]["ProblemResponse"];
|
|
3800
|
+
};
|
|
3801
|
+
};
|
|
3802
|
+
SiteTryAi: {
|
|
3803
|
+
parameters: {
|
|
3804
|
+
query: {
|
|
3805
|
+
/** @description The AI provider to try. */
|
|
3806
|
+
providerId: components["schemas"]["ProviderID"];
|
|
3807
|
+
};
|
|
3808
|
+
header?: never;
|
|
3809
|
+
path: {
|
|
3810
|
+
domain: string;
|
|
3811
|
+
};
|
|
3812
|
+
cookie?: never;
|
|
3813
|
+
};
|
|
3814
|
+
/** @description An optional edited extraction prompt to save before trying. */
|
|
3815
|
+
requestBody?: {
|
|
3816
|
+
content: {
|
|
3817
|
+
"application/x-www-form-urlencoded": components["schemas"]["SiteTryAiBody"];
|
|
3818
|
+
"application/json": components["schemas"]["SiteTryAiBody"];
|
|
3819
|
+
};
|
|
3820
|
+
};
|
|
3821
|
+
responses: {
|
|
3822
|
+
/** @description Session created. */
|
|
3823
|
+
201: {
|
|
3824
|
+
headers: {
|
|
3825
|
+
[name: string]: unknown;
|
|
3826
|
+
};
|
|
3827
|
+
content: {
|
|
3828
|
+
"application/json": components["schemas"]["VerificationSession"];
|
|
3829
|
+
};
|
|
3830
|
+
};
|
|
3831
|
+
/** @description Sandbox verification quota exceeded. */
|
|
3832
|
+
429: {
|
|
3833
|
+
headers: {
|
|
3834
|
+
[name: string]: unknown;
|
|
3835
|
+
};
|
|
3836
|
+
content: {
|
|
3837
|
+
"application/problem+json": components["schemas"]["Problem"];
|
|
3838
|
+
};
|
|
3839
|
+
};
|
|
3840
|
+
default: components["responses"]["ProblemResponse"];
|
|
3841
|
+
};
|
|
3842
|
+
};
|
|
3709
3843
|
DiscoverTeachAgent: {
|
|
3710
3844
|
parameters: {
|
|
3711
3845
|
query?: {
|
|
@@ -5222,7 +5356,7 @@ export interface operations {
|
|
|
5222
5356
|
};
|
|
5223
5357
|
};
|
|
5224
5358
|
301: components["responses"]["CanonicalRedirectResponse"];
|
|
5225
|
-
/** @description
|
|
5359
|
+
/** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
|
|
5226
5360
|
404: {
|
|
5227
5361
|
headers: {
|
|
5228
5362
|
[name: string]: unknown;
|
|
@@ -5258,7 +5392,7 @@ export interface operations {
|
|
|
5258
5392
|
};
|
|
5259
5393
|
content?: never;
|
|
5260
5394
|
};
|
|
5261
|
-
/** @description Precondition Failed. The supplied `If-Match` does not match the
|
|
5395
|
+
/** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
|
|
5262
5396
|
412: {
|
|
5263
5397
|
headers: {
|
|
5264
5398
|
[name: string]: unknown;
|
|
@@ -5303,7 +5437,7 @@ export interface operations {
|
|
|
5303
5437
|
};
|
|
5304
5438
|
};
|
|
5305
5439
|
403: components["responses"]["ForbiddenResponse"];
|
|
5306
|
-
/** @description Precondition Failed. The supplied `If-Match` does not match the
|
|
5440
|
+
/** @description Precondition Failed. The supplied `If-Match` does not match the provider's current `ETag` — re-fetch and retry. */
|
|
5307
5441
|
412: {
|
|
5308
5442
|
headers: {
|
|
5309
5443
|
[name: string]: unknown;
|
|
@@ -5319,7 +5453,7 @@ export interface operations {
|
|
|
5319
5453
|
header?: never;
|
|
5320
5454
|
path: {
|
|
5321
5455
|
providerId: components["schemas"]["ProviderID"];
|
|
5322
|
-
/** @description
|
|
5456
|
+
/** @description Provider slug. URL-safe identifier; lowercase letters, digits, and hyphens only. If stale, HTML callers get a 301 to the current slug. */
|
|
5323
5457
|
slug: string;
|
|
5324
5458
|
};
|
|
5325
5459
|
cookie?: never;
|
|
@@ -5338,7 +5472,7 @@ export interface operations {
|
|
|
5338
5472
|
};
|
|
5339
5473
|
};
|
|
5340
5474
|
301: components["responses"]["CanonicalRedirectResponse"];
|
|
5341
|
-
/** @description
|
|
5475
|
+
/** @description Provider not found, or it is `PRIVATE` and the caller is not authorized to see it. */
|
|
5342
5476
|
404: {
|
|
5343
5477
|
headers: {
|
|
5344
5478
|
[name: string]: unknown;
|